FrameLayout 布局使用时得出两点结论:
1、如果TextView不设置android:background,则背景默认为透明。设置后android:background="#FFFFFF",背景仍是白色,但是此时背景已经不是透明的了。
2、后面的view组件会放在前面的view组件上面;
测试代码如下:
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:text="@string/login_info1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView //这个TextView会放在前面TextView的上面
android:text="@string/login_info2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#FFFFFF"
/>
</FrameLayout>