问题是以下问题:在我的一个活动中,我需要为我的操作栏设置一个自定义布局,而且只需要在我的屏幕上设置一个透明的ActionBar就可以了.为此,我将ActionBar标记为叠加,并将操作栏背景指定为透明.这在使用
Android> = 15时有效,但在14及以下版本中,ActionBar会保留其底部边框.我试了一下去除它,没有用.
这是一张图片,可以更清楚地看到它:
在API 14上:
在API 16上:
设计如下:操作栏应该是透明的并且处于叠加模式,并且在其后面有徽标的背景
<ImageView android:id="@+id/action_bar_background" android:layout_width="match_parent" android:layout_height="@dimen/action_bar_accueil_total_height" android:layout_alignParentTop="true" android:contentDescription="@string/action_bar" android:scaleType="fitXY" android:src="@drawable/actionbar_logo_extended" /> <ImageView android:id="@+id/home_gallica_logo" android:layout_width="@dimen/largeur_logo_carrousel" android:layout_height="@dimen/action_bar_accueil_total_height" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:contentDescription="@string/action_bar" android:src="@drawable/logo_fullcolor" />
一些准确性:我使用ABS,但这似乎不是问题的根源,因为切换到v7支持库做了完全相同的事情.
有谁知道如何删除这个底部边框?
解决方法
按照评论中的
Luksprog建议和测试,我在我的操作栏中使用了Theme.Sherlock(而不是Theme.Sherlock.Light),并从我的旧主题中复制了我需要的设置.这似乎解决了这个问题,但我并不完全确定其来源.我可以给将要看到这个的人的唯一建议是使用Theme.Sherlock.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。