listview - android searchView hava one issue -
i have listview on listview have searchview filter item list.its work fine problem when click on searchview title textview no hidden . know how hide textview when click on searchview
the example below
in picture want hide textview food calories when click on searchview.
this ml code of searchview , textview
<searchview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/searchview" android:layout_alignparenttop="true" android:layout_toleftof="@+id/button1" android:layout_tostartof="@+id/button1" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:textappearance="?android:attr/textappearancelarge" android:text="food calories" android:id="@+id/tex" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:textcolor="#ffffffff" android:layout_margintop="10dp"/>
this activity code.
public class datalistactivity extends activity { protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); requestwindowfeature(window.feature_no_title); setcontentview(r.layout.data_list_layout); searchview sear = (searchview)findviewbyid(r.id.searchview); sear.setonquerytextlistener(new searchview.onquerytextlistener() { @override public boolean onquerytextsubmit(string query) { return false; } @override public boolean onquerytextchange(string newtext) { listdataadapter.getfilter().filter(newtext); return true; } });}
Comments
Post a Comment