[Proposal] SelectAllTextEffect
See original GitHub issueSelectAllTextEffect
- 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:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@brminnick, @pictos seems like it can be closed as completed. any objections?
I’ll use this one to draw the API to implement our
Effect
s asBehavior
and after that go through all otherEffects
and see if it makes sense for all.As we discussed on the last CommunityStandup