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

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -