android - Id of edittext in searchable app -
i want implement search view in app when user clicked on search button on device search data. dont know how can set id default search edittext , how can id of that.i know id of edittext findviewbyid dont know id of edittext
add edittext in xml file want appeare , set visibility "gone" , set , id it. ex:
<edittext android:id="@+id/myid" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone" />
when want appear (when press search button guess) set visibility visible. ex: edittext..setvisibility(view.visible);
now edittext visible , user can add input. input gettext().tostring() , when want gone set visibility gone.
Comments
Post a Comment