我有一個要求...我想要透明的佈局(80%像這樣透明),以便背景應該可見。有沒有辦法做同樣的..?透明佈局......?
我想,(但不是working..that第二線性佈局應透明)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#C0C0C0">
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="60dip"
android:background="@drawable/style">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<style name="YourTheme" parent="android:@Theme.Translucent">
<item name="android:windowBackground">@color/background</item>
</style>
</resources>
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<color name="background">#55000000</color>
</resources>
,但它不工作。 第二條線性曲線應該是透明的。
感謝.....
能否請你後你做了什麼的瞬間?和transperent意味着什麼?你想讓你的壁紙在你的半透明背景下被看到嗎? – Hiral 2012-02-01 12:21:30
你正好...你有我的要求。半透明背景下可見的壁紙.. ????。 – KKC 2012-02-01 12:33:57
但是,你不能爲你的xml的一部分做到這一點,你可以讓你的完整活動是transperent.please請參閱http://developer.android.com/resources/samples/ApiDemos/src/com/example/android /apis/app/TranslucentBlurActivity.html和http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/TranslucentActivity.html – Hiral 2012-02-01 12:37:58