I'm using an EditText of some predefined size, however when a user enters more text then fits in the text box, they aren't able to scroll the text with touch. Scrolling does work with a trackball.
What can I do to fix this?
If you would like the text to scroll horizontally, define in your EditText XML tag:
android:scrollHorizontally="true"
If you would like a vertical scroll, define in your EditText XML tag:
android:scrollbars = "vertical"
Hope this helped.
make the changes like the following to get scroller in your EditText
questionEntry.setScroller(new Scroller(myContext));
questionEntry.setMaxLines(1);
questionEntry.setVerticalScrollBarEnabled(true);
questionEntry.setMovementMethod(new ScrollingMovementMethod());
How to make edittext in Android scrollable?
Donot forget to vote if you feel my response is helpful for you
Thanks Deepak
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With