Android的创造底栏菜单 [英] Android creating Bottom Bar Menu

查看:220
本文介绍了Android的创造底栏菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想有一个静态的底部菜单栏存在,通过了在每一页中可见的应用程序底部所有的时间。我已经设计了菜单栏,但我很困惑,我是否具备整合菜单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

本文还可以帮助你。

<一个href=\"http://android-developers.blogspot.com/2009/02/android-layout-tricks-2-reusing-layouts.html\">http://android-developers.blogspot.com/2009/02/android-layout-tricks-2-reusing-layouts.html

这篇关于Android的创造底栏菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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