0
我想实现一个透明的操作栏背景效果,虽然奇怪它不工作。 我想这样做是为了被称为 “UnitActivity” 和这里的活动是它的XML:Android - 操作栏不透明
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/
</LinearLayout>
在我styles.xml
<style name="mangoTheme.UnitActivityActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:windowActionBarOverlay">true</item>
<item name="android:background">@drawable/transparent</item>
</style>
在我的themes.xml
<style name="mangoTheme.UnitActivityTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/mangoTheme.UnitActivityActionBarStyle</item>
</style>
在我的manifest.xml
<activity android:name=".UnitActivity"
android:label="Unit Selection"
android:parentActivityName=".MainActivity"
android:theme="@style/mangoTheme.UnitActivityTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
以下是9补丁文件,我使用即“@绘制/透明”
注:: 我还试图写的可绘制的形状并将其用作背景的它具有以下代码操作栏:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#00FFFFFF"/>
</shape>
我刚开始灰色的背景颜色为我的行动吧......你会认为这是由于我的activity_unit.xml的背景橙色。我必须缺少的东西不多,在这一点上:S