<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="#e5e5e5">
< RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:drawable/toast_frame"
android:padding="4dp" > //经测试,这里一定要设置,不然这上面覆盖的白色背景无法全部覆盖@android:drawable/toast_frame的黑色背景
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:padding="13dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Sombra no estilo Toast"
android:textColor="#707070" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="#e5e5e5">
< RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:drawable/toast_frame"
android:padding="4dp" > //经测试,这里一定要设置,不然这上面覆盖的白色背景无法全部覆盖@android:drawable/toast_frame的黑色背景
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:padding="13dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Sombra no estilo Toast"
android:textColor="#707070" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>