android - Add Edit Text in toolbar on menu item's click -


i have search icon in toolbar. want show edit text field when user clicks on search icon.

i've searched on internet couldn't find answer. set visibility false of edit properties menu, , when user clicks search icon try set visibility true, didn't work.

p.s set visibility true by: edittext.setvisibility(view.visible);

you can use edittext inside relativelayout layout_gravity : top. relativelayout closing toolbar.

so next must :

  1. icon search on toolbar if clicked, give relativelayout visibility= visible, , toolbar visibility : invisible
  2. and give button close relativelayout, when button clicked, give toolbar visibility = visible , relativelayout visibility = invisible

there way can see whats application. can use visibility = view.gone

this maybe can you


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -