Android EditText not writing from left to right -


i've got edittext changes seekbar if text being edited writes right left reason.

this way it

pricetext.addtextchangedlistener(new textwatcher() {         @override         public void aftertextchanged(editable medit) {         }          public void beforetextchanged(charsequence s, int start, int count, int after) {         }          public void ontextchanged(charsequence s, int start, int before, int count) {             priceseekbar.setprogress(integer.parseint(pricetext.gettext().tostring()));         }     }); 

xml

 <edittext             android:id="@+id/priceamount"             android:layout_width="50dp"             android:textsize="15dp"             android:layout_height="22dp"             android:background="@drawable/background_edittext"             android:gravity="center"             android:inputtype="number"         /> 

i think it's caused by

priceseekbar.setprogress(integer.parseint(pricetext.gettext().tostring())); 

when remove line, goes normal i'm not sure why. ideas?

try doing

<edittext      ...      android:gravity="left"      ... 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -