在重用Android应用公共布局 [英] Reusing the common layout in android application

查看:162
本文介绍了在重用Android应用公共布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让具有以下设计的应用程序。

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

登录 - >控制面板

仪表板具有一个列表视图,其中的每一项打开一个片段的#navigationdrawer。

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

仪表板有两页视图寻呼机。

Dashboard has a view pager of two pages.

第1页:列表视图
第2页:搜索栏

Page 1 : listview Page2: search bar.

到现在为止,这是到位。

Till now this is in place.

该#第二页是恒定的它出现在每一个片段,但#1页每一个片段的变化。有人可以帮助我实现这个目标。

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.

推荐答案

我想你应该在仪表盘的动作条使用搜索菜单项,而不是片段,并使用viewpager显示。请检查下面的链接进行搜索界面。
http://developer.android.com/guide/topics/search/search -dialog.html

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

这篇关于在重用Android应用公共布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆