问题
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