TYPE_CLASS_NUMBER input type on android scrolls ScrollView to it's right end. Why? -
i have horizontalscrollview, in have edittext. if don't set input type, works expected. however, if use type_class_number, scrolls right end when select it. why? how fix problem?
text input has left gravity/justification , number input has right gravity/justification.
you can override either in layout xml or programmatically.
<edittext android:id="@+id/etnumbers" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="left" android:inputtype="number" android:hint="@string/et_number_hint"/>
or
edittext etnnumber = (edittext) findviewbyid(r.id.etnumbers); etnumber.setinputtype(inputtype.type_class_number); etnumber.setgravity(gravity.left);
post existing implementation , can edit actual code solution.
Comments
Post a Comment