• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HorizontalScrollView doesn't work with EditText

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic