2011-10-08 41 views
2

在我的活動中,我嘗試使其透明和9貼片角落設計,但它仍然在角落裏顯示黑色,任何人都知道如何擺脫它?完全透明的活動與9貼片角落圖像

我試圖做的,是不透明的(正常)活動A與啓動爲如下圖所示圖像的新的透明活動B但9patch背景的邊角設計並不完全透明。

enter image description here

這裏是我的9patch

enter image description here

活動XML

<?xml version="1.0" encoding="utf-8"?> 
<ScrollView 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:cacheColorHint="#00000000" 
    android:fadingEdge ="horizontal" 
    android:dividerHeight="0dp" 
    android:background="@drawable/orange9patch"> 
    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:orientation="vertical" 
     android:isScrollContainer="true" 
     android:scrollbars="vertical" 
     android:padding="12dip" > 
[...........] 

清單

<activity android:name=".ui.ResultActivity" 
     android:theme="@style/Theme.Transparent"> 
    </activity>   

風格

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
    <style name="Theme.Transparent" parent="android:Theme"> 
    <item name="android:windowIsTranslucent">true</item> 
    <item name="android:windowContentOverlay">@null</item> 
    <item name="android:windowNoTitle">true</item> 
    <item name="android:windowIsFloating">true</item> 
    <item name="android:backgroundDimEnabled">true</item> 
    </style> 
[..........] 

回答

3

使用<style name="Theme.Transparent" parent="android:style/Theme.Translucent">

,而不是你的。

+0

Thanks = D很好用! – xDragonZ