android - 如何像新的 GMail 应用程序一样在 ActionBar 中创建双行文本

标签 android gmail android-actionbar

Google 发布了适用于 Android 的新 gmail 应用程序,我注意到它们在同一位置同时显示“收件箱”和用户的电子邮件。

这是我可以在我的应用中复制的标准 ActionBar 功能吗?

如何在 ActionBar 中创建不同字体的双行文本,或者如何创建自定义 Widget 并在 ActionBar 中使用它?

enter image description here

最佳答案

默认的 ActionBar 有一个标题和副标题:http://developer.android.com/reference/android/app/ActionBar.html#setSubtitle(int)

请注意需要设置DISPLAY_SHOW_TITLE

关于android - 如何像新的 GMail 应用程序一样在 ActionBar 中创建双行文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16972504/

相关文章:

android - Android模块中有什么方法可以从它自己的模块而不是从app模块中获取资源?

android - 布局保持空白

Gmail IMAP : Any way to find all Labels (folders) a particular message is in?

python - 如何使用 Gmail API 检查收到的新邮件

android - SearchView 小部件未显示在操作栏中

android - 根据 ViewPager Android 显示菜单项

android - 数据绑定(bind) - 必须首先将 Lambda 表达式解析为其 setter 以获取类型

android - 你能在同一个类中有一个 textSwitcher 和 imageSwitcher 吗?

javascript - 具有 Gmail 风格拼写检查功能的富文本编辑器

android - 即使使用 setHomeButtonEnabled(true) 应用程序图标在 Android 14 中也不可点击