I m using SearchView
widget to enable searching in my app. After the initial click on the search icon, the SearchView
widget expands into the search field and the "back" arrow is shown next to the application icon. If I click the application icon the action bar reverts to the initial state (no "back" arrow) and the SearchView
reverts back to icon.
现在的问题是:在搜查完成后,行动限制会改变方向,唯一的回路是点击“icon”或“背”arrow。 并非好事,因为当搜查时,我想要行动吧进入最初状态。 我尝试了SearchView.setIconofied(true)
,但有两个问题:
- Search icon appears at the same spot as the edit field (originally it s on the far right).
- Action bar still displays "back" arrow.
我认为,由于偏离常规导航模式,我面临的问题一成不变。 在我的案件中,一切都发生在同一活动范围内(研究结果见于作为行动标的同一活动),例如,执行<条码>的操作性。
How do I trigger "go back one step" of the action bar? Or simulate click on the application icon?