TextView: Additional Move method proposals
See original GitHub issueWith the update merged that added two public methods to the TextView
for MoveHome
and MoveEnd
I would like to propose the following:
- The existing
MoveUp()
andMoveDown()
methods be changed from private to public. - Add
MoveRight()
andMoveLeft()
public methods that allow programmatic moving of the cursor to the right and left (with an overload for each that will specify whether the cursor should go the next or previous lines if at EOL or BOL respectively or stop at the line barrier).
With the 2nd item the code in ProcessKey()
that handles Key.CursorRight
and Key.CursorLeft
can then call MoveRight()
and MoveLeft()
with the option to move lines when at EOL or BOL.
The only thing I waffled on was whether MoveRight()
and MoveLeft()
should move the cursor to a different line or not by default without specifying. I don’t really have a strong opinion either way.
I went ahead and coded this so you see what I’m proposing.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
android: move a view on touch move (ACTION_MOVE)
I've found an easy approach to do that with the ViewPropertyAnimator: float dX, dY; @Override public boolean onTouch(View view, ...
Read more >Layouts and binding expressions
The expression language allows you to write expressions that handle events dispatched by the views. The Data Binding Library automatically ...
Read more >NSTextView | Apple Developer Documentation
A set of optional methods that text view delegates can use to manage selection, set text attributes, work with the spell checker, and...
Read more >When I add the textView to the LinearLayout, it jumps ...
When I add the textView to the LinearLayout, it jumps automatically to the top of the screen and I can't move it. Help?...
Read more >TextView.MovementMethod Property (Android.Widget)
Gets the android.text.method.MovementMethod being used for this TextView, which provides positioning, scrolling, and text selection functionality.
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
I think this issue was addressed with the KeyBinding stuff added in and around #1566 and #1548.
@blakepell can you confirm?
Thank you for the feedback. After thinking about it more I totally agree with you, I’ll update my example.