• Post Reply Bookmark Topic Watch Topic
  • New Topic

HorizontalScrollView doesn't work with EditText  RSS feed

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an edittext in a HorizontalScrollView but it doesn't allow me to scroll when the numbers I put in exceeds the maximum input length.
I can only go back by deleting.
It works perfectly fine with my TextViews though.

This is the code.

 
Rancher
Posts: 1158
30
Android Chrome IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Android API Doc wrote:HorizontalScrollView only supports horizontal scrolling. For vertical scrolling, use either ScrollView or ListView.


You can find out more about this here https://developer.android.com/reference/android/widget/HorizontalScrollView.html which is the API documentation for this control.
 
Pete Letkeman
Rancher
Posts: 1158
30
Android Chrome IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could also try setting hard/real values for layout_width and layout_height on both the parent view/conrol and the current view/control.
Currently in a few places in your code you are using wrap_content and/or match_parent.
If you do this, then one by one you can replace the hard values with relative values to see which ones are causing the problems.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!