- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我想在低版本的 Android 上使用 Material Design。
我知道,
但是,我不想使用 ActionbarActivity,因为它与 Activity 有很大的不同,而且它对我来说看起来不灵活,这让我对使用 ActionbarActivity 感到紧张。它看起来只是 Actionbar 的 Activity 类。
所以,我考虑用Toolbar(stand-alone)代替Actionbar。而且似乎当我不使用 Actionbar 时,也不必使用 ActionbarActivity。
最后,我找到了一个使用下面的解决方案。
你觉得这样对吗?还是根本没有意义?
最佳答案
But, I don't want to use ActionbarActivity, because of quite diffrence with Activity and It just looks like unflexible to me, and that makes me nervous to use ActionbarActivity. It looks like just Activity class for Actionbar.
我不明白为什么你使用 ActionBarActivity 不灵活,毕竟 ActionBarActivity derives from Activity
如果我没记错的话,您必须从 ActionBarActivity 派生才能使用工具栏和所有菜单、标题等以前由 ActionBar 本身使用的东西。
也就是说,我认为主题部分还可以,使用 Toolbar 而不是 ActionBar 也可以,我唯一不同意的部分是 Activity 而不是 ActionBar Activity。
希望对您有所帮助!
关于android - 我可以在 Appcompat-v7 中使用没有 Actionbar 的 Activity 而不是 ActionbarActivity 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27470958/
我在我的应用程序中设置了一个操作栏。我通过调用 Activity.getActionBar() 取回 ActionBar .然后我设置了我需要的所有选项卡感谢 ActionBar.addTab()和
我正在为 Android 平板电脑 (XOOM) 开发应用程序,我想知道是否可以将操作栏放在屏幕底部,而不是顶部(这是默认选项) . 谢谢。 最佳答案 如果您在 Activity 中获取 Action
我很想为我用“ActionBar Sherlock”库导入的 ActionBar 设置一个背景图像。但是,我在 Internet 上找不到任何有关如何使用 XML 独特地设置 BackgroundIm
我需要在栏下方显示子菜单,而不是在栏本身的顶部。 复制下面我的 actionbar xml 在activity中(
我已经阅读了 AppCompat 库中的工具栏及其所有功能。我在 android 开发者博客 (here) 中注意到的一些事情是: Toolbar is fully supported in AppC
我试图做一个 Espresso 测试来检查 actionbar 是否隐藏/显示,但我似乎无法弄清楚如何将它与 Espresso.onView(...) 匹配。 Afaik它没有ID,对吧? 非常感谢
我们怎样才能让操作栏和操作栏选项卡变成纯白色。我正在使用 android-support-v7-appcompat 库来支持向后兼容性。 style/Theme.AppCompat.Light.Dar
在 Galaxy S3 上,我遇到一个问题,即 ActionBar 中的一个按钮被配置为 showAsAction="always"并且同时显示在硬件溢出菜单和操作按钮上。我希望它不显示在硬件溢出菜单
我正在学习教程 https://www.youtube.com/watch?v=VVahIc8yENk我得到了错误 java.lang.NullPointerException: Attempt to
背景 我希望在 PreferenceActivity 上显示一个 ActionBar,因为它不适用于 Honeycomb 之前的设备(即使在支持库中)。 因为这样的类在支持库中不可用,所以我不能只调用
我想实现将下载数据并将其设置到 ActionBar 选项卡中的应用程序。我已经实现了它,但我还有一件事要做。我试过添加操作栏列表,像这样 one , 但 android 不允许同时使用 Tabs 和
我希望我的 ActionBar 和 Tabs 看起来像这样。 请忽略颜色 目前看起来是这样 由于我的主题,我必须在 java 中设置自定义 ActionBar。 actionBar.setDispla
我目前正在某些页面上设置 ActionBar 副标题,但在某些页面上我不想有副标题。 我可以简单地将字幕文本设置为空,但这只会删除文本。它仍然占据字幕空间,从而将标题推高。可能很难解释,所以我用图片说
import android.app.ActionBar; import android.app.FragmentTransaction; import android.content.Intent;
我正在使用 ActionBarSherlock ,并尝试隐藏/显示全屏图像的 ActionBar,使用: getSupportActionBar.hide(); 和 getSupportActionB
我在我的简单应用程序上使用 ActionBarSherlock,如果用户在主页/主要 Activity 中,我想隐藏主页按钮。我了解如何使用 setHomeButtonEnabled(false) 执
我发现自己在 3 个单独的 Activity 中为我的 actionBar (actionBarSherlock) 列表重写了相同的代码。所有 3 个都使用相同的 actionBar,它有 3 个项目
我正在使用 ActionBarSherlock 在关于 ActionBar 标签高度的类似问题中,我使用了: @style/blah1 @style/blah2 80dp .
我一直在寻找是否有任何关于如何始终在 ActionBar 下方显示 ActionBar 选项卡的信息,即使当手机横向时也是如此。我知道它会根据屏幕上是否有足够的空间来自动将选项卡放置在 ActionB
我在 ActionBar 上方显示的 ActionBar Tabs 出现了这种奇怪的行为。当我为 ActionBar 设置自定义 View 时,这恰好发生了。我正在使用 Roman Nurik 的示例
我是一名优秀的程序员,十分优秀!