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,

现在我的应用程序具有如下图所示的向上导航,

enter image description here

I want to show the action bar, Up navigation and Tab.I want it like the below image,

我想显示操作栏,向上导航和Tab.I想要它像下面的图像,

enter image description here

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和背景颜色。

更多相关文章

  1. 如何将本机应用程序(android)与phonegap应用程序集成
  2. 为什么我的Android应用程序偶尔可以非常快地耗尽电池?
  3. 如何在android 5.0(L)中运行应用程序活动名称?
  4. Android应用程序启动过程上
  5. Java Android套接字连接。错误的IP地址导致应用程序停止响应
  6. Android 为你的应用程序添加快捷方式【优先级高的快捷方式】
  7. 添加脚本到Android应用程序
  8. Android中的内存储、外存储概念、文件操作与PC端的有些不同
  9. 如何使用java RESTful Web服务将通知推送到Android应用程序

随机推荐

  1. 在 Android(安卓)上使用 XML 和 JSON,第 2
  2. android解析json数组
  3. android 开发中遇到错误及解决办法总结(
  4. Android使用WCF的服务程序之入门
  5. Android Studio插件
  6. android网站汇集
  7. android 读取mac地址
  8. Android软键盘(四)软件盘弹出布局上移的问
  9. Android 新加几个开源项目
  10. 系统重置