显示操作栏和向上导航 - Android
I already implemented material theme and scroll-able tab in my app. Currently the Up navigation in my app is working but the Action bar is not visible. I am using the below theme,
我已经在我的应用中实现了材质主题和滚动选项卡。目前我的应用程序中的向上导航正在运行,但操作栏不可见。我使用以下主题,
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
Now my app have the Up navigation like below image,
现在我的应用程序具有如下图所示的向上导航,
I want to show the action bar, Up navigation and Tab.I want it like the below image,
我想显示操作栏,向上导航和Tab.I想要它像下面的图像,
Is it possible to do it in android.
有可能在android中做到这一点。
1 个解决方案
#1
0
In your manifest.xml file, find the activity for which you want to add the action bar and add these lines
在manifest.xml文件中,找到要为其添加操作栏的活动并添加这些行
<activity
android:theme="@android:style/Theme.AppCompat.Light.DarkActionBar"
....
>
or you can use RelativeLayout at top with background color, if you want custom Action bar.
或者,如果需要自定义操作栏,可以在顶部使用RelativeLayout和背景颜色。
更多相关文章
- 如何将本机应用程序(android)与phonegap应用程序集成
- 为什么我的Android应用程序偶尔可以非常快地耗尽电池?
- 如何在android 5.0(L)中运行应用程序活动名称?
- Android应用程序启动过程上
- Java Android套接字连接。错误的IP地址导致应用程序停止响应
- Android 为你的应用程序添加快捷方式【优先级高的快捷方式】
- 添加脚本到Android应用程序
- Android中的内存储、外存储概念、文件操作与PC端的有些不同
- 如何使用java RESTful Web服务将通知推送到Android应用程序