Thursday, 15 May 2014

Scrolling text in android EditText widget -



Scrolling text in android EditText widget -

i have single line edittext in android displays long line of text. now, requirement when scroll end of line, , keeps on deleting characters using backspace, text should maintain scrolling horizontally more space available. after going through other questions , other online resources, have set next style:

<style name="myedittext" parent="@android:style/widget.edittext"> <item name="android:maxlines">1</item> <item name="android:scrollhorizontally">true</item> <item name="android:singleline">true</item> </style>

but not work. have seen behavior in other applications, know works on android. help much appreciated. in advance.

try add together constraints in layout of edittext instead defining style

<edittext android:id="@+id/edittext1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="5" android:maxheight="40dp" android:scrollbars="vertical" android:scrollbarstyle="outsideoverlay" >

try may help u

android

No comments:

Post a Comment