Android的创造底栏菜单菜单、Android

由网友(最终成了单身狗)分享简介:我想有一个静态的底部菜单栏存在,通过了在每一页中可见的应用程序底部所有的时间。我已经设计了菜单栏,但我很困惑,我是否具备整合菜单code与每一个布局XML的,使菜单的每个页面可见,并在每个活动课写code在菜单中点击执行功能。或者,如果有任何其他的方式,我可以创建一个常见的底部即在于每一页都写有菜单的code在一个单一...

我想有一个静态的底部菜单栏存在,通过了在每一页中可见的应用程序底部所有的时间。我已经设计了菜单栏,但我很困惑,我是否具备整合菜单code与每一个布局XML的,使菜单的每个页面可见,并在每个活动课写code在菜单中点击执行功能。或者,如果有任何其他的方式,我可以创建一个常见的底部即在于每一页都写有菜单的code在一个单一的活动课吧

I want to have an static bottom menu bar exist through out the applications in every page visible at bottom all the time. I have designed the menu bar but i am confused whether i have to integrate the menu code with every layout xmls to make menu visible in every page and write the code in every activity class to perform functions on menu clicks. Or if there is any other way i can create a common bottom bar that lies with every page with writing the code of menu in a single activity class.

推荐答案

那么在我看来,最好的办法,就是在每一个活动的XML文件来创建底栏的XML文件,并将其包括

Well the best way in my opinion , is to create a bottom bar xml file , and include it in every Activity's xml file

<include android:layout_width="fill_parent" layout="@layout/bottom_bar" />

在您的底栏的XML文件名是bottom_bar.xml

where your bottom bar xml file name is bottom_bar.xml

本文还可以帮助你。

http://android-developers.blogspot.com/2009/02/android-layout-tricks-2-reusing-layouts.html

阅读全文

相关推荐

最新文章