安卓:添加按钮,该应用程序的标题? [英] android: adding button to the title of the app?

查看:110
本文介绍了安卓:添加按钮,该应用程序的标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能将一个按钮添加到应用程序标题的右下角?

Is it possible to add a button to the right corner of the app title?

例如,添加一个刷新按钮的称号。饲料:我的饲料?

e.g., adding a "refresh" button to the title of "Feed: my feeds"?

http://www.android.com/market/apps/ feedr-LG-01.JPG

http://www.android.com/market/apps/feedr-lg-01.jpg

推荐答案

要做到这一点,恕我直言,是摆脱标准的标题栏(最简单的方法安卓主题=@机器人:风格/ Theme.NoTitleBar<活性GT; 在清单元素),并把自己的标题栏处的顶部活动。

The simplest way to do that, IMHO, is to get rid of the standard title bar (android:theme="@android:style/Theme.NoTitleBar" in the <activity> element in the manifest) and put your own "title bar" at the top of the activity.

请注意,虽然,按钮,在标题栏风格更iPhone十岁上下。 Android版会通常,在选项菜单中,因此用户界面是更简洁(两个水龙头的成本做了刷新)。

Note, though, that the "button in the title bar" style is more iPhone-ish. Android would typically have that in the option menu, so the UI is less cluttered (at the cost of two taps to do the refresh).

这篇关于安卓:添加按钮,该应用程序的标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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