question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Proposal] SelectAllTextEffect

See original GitHub issue

SelectAllTextEffect

  • Proposed
  • Prototype
  • Implementation
    • iOS Support
    • Android Support
    • macOS Support
    • Windows Support
  • Unit Tests: Not Started
  • Sample
  • Documentation: Not Started

Summary

Highlights all text when an InputView is selected

Detailed Design

SelectAllTextEffect.shared.cs

public class SelectAllTextEffect : RoutingEffect
{
}

SelectAllTextEffect.android.cs

public class SelectAllTextEffect : PlatformEffect
{
  EditText EditText => (EditText)Control;
  
  protected override void OnAttached() => EditText?.SetSelectAllOnFocus(true);
  
  protected override void OnDetached() => EditText?.SetSelectAllOnFocus(false);
}

SelectAllTextEffect.ios.cs

public class SelectAllTextEffect : PlatformEffect
{
  protected override void OnAttached() => ApplyEffect(true);
  
  protected override void OnDetached() => ApplyEffect(false);
  
  void ApplyEffect(bool apply) => ApplyToControl(Control, apply);

  bool ApplyToControl<T>(T controlType, bool apply) => controlType switch
  {
	UITextField textField => ApplyToUITextField(textField, apply),
	UITextView => ApplyToUITextView(apply),
	_ => throw new NotSupportedException($"Control of type: {controlType?.GetType()?.Name} is not supported by this effect.")
  };
}

Usage Syntax

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
VladislavAntonyukcommented, Mar 1, 2023

@brminnick, @pictos seems like it can be closed as completed. any objections?

1reaction
pictoscommented, Dec 17, 2021

I’ll use this one to draw the API to implement our Effects as Behavior and after that go through all other Effects and see if it makes sense for all.

As we discussed on the last CommunityStandup

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create a Repetitive Text Effect Illusion in Illustrator
Step 4. At this point, things will get a bit repetitive as you need to select each new compound path and go to...
Read more >
Selecting all keyframes which have the same time value
There are a few possible solutions: Add a shortcut to select all keyframes that have the same value with the keyframe that is...
Read more >
Customize your text using Text Effects
Change the look of your text by customising, brightening up, and adding some personality and fun to all your texts using this amazing...
Read more >
Structuring your content and layout inside content blocks
Then click the 'Content and Layout' tab. Changing your text colour. Change your background and text colour to any HEX value you like,...
Read more >
Add animated text effects - Google Web Designer Help
In the Text Effects panel, select the effect that you want from the Effect dropdown: Blur; Drop in; Gradient; Flip. Line up; Roll;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found