我希望我的活動看起來像一個大型的對話框,透明的東西說四邊都是四分之一,中間部分是堅固的,我可以放置視圖。 我以爲使用框架佈局將是一個框架佈局內的另一個答案,但我無法使第一個透明。使FrameLayout透明
我的XML文件: -
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00000000" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="50dp"
android:layout_marginLeft="75dp"
android:layout_marginRight="75dp"
android:layout_marginTop="50dp" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Search" />
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/button1"
android:layout_alignParentLeft="true"
android:layout_marginBottom="30dp"
android:gravity="center"
android:hint="Enter Movie Name!" />
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/editText1"
android:layout_centerHorizontal="true" />
</RelativeLayout>
</FrameLayout>
</FrameLayout>
它不工作。有任何想法嗎?
你在找這樣的事嗎? http://imgur.com/dBCM9WR – aProperFox 2014-10-17 15:55:54
是的,那就是我想要的。 – Mohit 2014-10-17 15:58:21