简体   繁体   中英

SearchView in 2 activity

know anyone how can I split my seach view in 2 activity? Before the click on search icon you are in one activity and after you click on it you will be in anther activity were you can write what do you want.

for this purpose you should build tow Fragment as I understood your question. you write your code about searching (EditView, Button etc.) and code about result in second fragment.

after user click on your Button, you change you pass Data to second fragment and show the search result. with this structure you can use this fragment for landscape form of your activity to search and show in one screen cross each other. is this clear or i explain more dear friend?

如果我理解正确,只需在“菜单”(即工具栏)中显示搜索图标,然后在其中,OnOptionsItemSelected()方法将调用新活动(即搜索活动)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM