android - TextInputLayout in listview -
when use material design support textinputlayout in classic layout, have no problem, hint animation.
but when use inside listview, lose this, , behaves classical edittext.
why???
here code ( 1 cell xml):
<?xml version="1.0" encoding="utf-8"?>
<linearlayout android:id="@+id/ll_row" android:layout_width="match_parent" android:layout_height="60dp" android:layout_gravity="center_horizontal" android:orientation="horizontal"> <android.support.design.widget.textinputlayout android:id="@+id/til_valor" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:hint="test2" android:imeoptions="actionnext"> <edittext android:id="@+id/valor" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="test" android:inputtype="text" /> </android.support.design.widget.textinputlayout> <imagebutton android:id="@+id/cambutton" android:layout_width="50dp" android:layout_height="match_parent" android:background="@drawable/button_azul_states" android:contentdescription="tomar foto" android:gravity="center" android:src="@drawable/ic_action_device_access_camera" /> </linearlayout> </android.support.v4.widget.nestedscrollview>
initially, had linearlayout, tried use nestedscrollview, without success...
try removing both hint in layout , call sethint on textinputlayout instance code
edit: realized answer wrong. case different because use recyclerview, i've tried listview , animated hint won't work...
i suggest convert recyclerview, it's easy , solves issue
Comments
Post a Comment