0

Why android:scrollHorizontally="true" don't work?

<EditText   
     ...
     android:cursorVisible="false"
     android:ellipsize="end"
     android:hint="@string/place_search_hint"
     android:imeOptions="actionSearch|flagNoFullscreen"
     android:inputType="numberDecimal"
     android:digits="0123456789.,-"
     android:maxLines="1"
     android:scrollHorizontally="true"/>

But if set android:inputType="text" - this work perfectly...

2 Answers2

1

If remove android:scrollHorizontally="true" in XML, and write programmaticaly placeSearch.setHorizontallyScrolling(true); in Java.

Scroll Horizontally in EditText work perfectly!

Good luck!

0

Try to remove the ellipsize attribute. It has no effect as long as you have the inputType defined (see here) - but could affect the scrolling behavior.

Also, you could try to set the scroll programatically, like editText.setScroller(new Scroller(myContext));

Cosmin Telescu
  • 113
  • 1
  • 2
  • 8