显示ImageView的部分在透明的ActionBar [英] Show ImageView partly behind transparent ActionBar

查看:188
本文介绍了显示ImageView的部分在透明的ActionBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在谷歌地图应用程序有一个透明的动作条,通过该地图是可见的。

The Google Maps application has a transparent ActionBar, through which the map is visible.

我可以用这个来设定动作条的透明度:

I am able to set the transparency of the ActionBar using this:

<style name="Theme.MyTheme" parent="android:style/Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/ActionBar</item>
</style>

<style name="ActionBar" parent="@android:style/Widget.Holo.ActionBar">
    <item name="android:background">#64000000</item>
</style>

但我怎么能显示我的动作条后面的ImageView?

But how can I show my ImageView behind the ActionBar?

推荐答案

您可以启用动作条的覆盖模式。要做到这一点,你必须设置(安卓)在主题windowActionBarOverlay 项目

You can enable overlay mode of the ActionBar. To do it you have to set (android:)windowActionBarOverlay item in the theme to true.

<style name="MyTheme" parent="Theme.Sherlock">
    ...
    <item name="windowActionBarOverlay">true</item> <!-- for ActionBarSherlock -->
    <item name="android:windowActionBarOverlay">true</item>
</style>

这篇关于显示ImageView的部分在透明的ActionBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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