我想下的动作栏中删除分隔 [英] I want to remove the divider under the action bar

查看:91
本文介绍了我想下的动作栏中删除分隔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做的是严格按照显示的图像

What I'm trying to do is exactly as shown in the image"

我想删除这个分隔。我使用的是内置的操作栏中的机器人。我不想用夏洛克行动吧。我必须使用Android的动作吧。

I want to remove this divider. I'm using the android built-in action bar. I don't want to use Sherlock Action Bar. I have to use android action bar.

我试图把它添加到我的风格,但它不工作

I have tried to add this to my styles but its not working

<style name="MyDropDownNav" parent="android:style/Theme.Holo.Light">
    <item name="android:dropDownSelector">@drawable/ic_launcher</item>
    <item name="android:divider">@null</item>
</style>

你有什么建议吗?

Do you have any suggestions?

推荐答案

您可以实施半透明操作栏

定制半透明的Andr​​oid动作条

<一个href="http://stackoverflow.com/questions/13381567/show-imageview-partly-behind-transparent-actionbar">Show ImageView的部分在透明的ActionBar

定义主题

<resources>
<style name="Theme.TranslucentActionBar" parent="@android:style/Theme.Holo.Light.DarkActionBar">
    <item name="android:actionBarStyle">@style/Widget.ActionBar</item>
</style>

<style name="Theme.TranslucentActionBar.ActionBar" />

<style name="Theme.TranslucentActionBar.ActionBar.Overlay">
    <item name="android:actionBarStyle">@style/Widget.ActionBar.Transparent</item>
    <item name="android:windowActionBarOverlay">true</item>
</style>
</resources>

和样式你的操作栏

<resources>
<style name="Widget.ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
    <item name="android:background">@drawable/ab_background</item>
</style>

<style name="Widget.ActionBar.Transparent">
    <item name="android:background">@android:color/transparent</item>
</style>
</resources>

然后把它应用在你的的Andr​​oidManifest.xml

这篇关于我想下的动作栏中删除分隔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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