我希望我的活动看起来像一个大型的对话框,透明的东西说四边都是四分之一,中间部分是坚固的,我可以放置视图。 我以为使用框架布局将是一个框架布局内的另一个答案,但我无法使第一个透明。使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