Reusing the common layout in android application

依然范特西╮ 提交于 2019-12-25 07:26:58

问题


I am trying to make an application that has the following design.

Login->Dashboard

Dashboard has a #navigationdrawer having a listview ,of which every item opens a fragment.

Dashboard has a view pager of two pages.

Page 1 : listview Page2: search bar.

Till now this is in place.

Problem statement :

The #page2 is constant it has to appear on every fragment ,but #page1 changes for every fragment . Can someone help me achieve this.

I am not getting how to do it.


回答1:


I think you should use search menu item in Dashboard's ActionBar instead of fragment and display it using viewpager. Check following link to make search interface. http://developer.android.com/guide/topics/search/search-dialog.html



来源:https://stackoverflow.com/questions/23725183/reusing-the-common-layout-in-android-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!