Android 第八课——UI布局2
Android布局分为:线性布局、相对布局、表格布局、帧布局、网格布局五种 1)FrameLayout(帧布局) 帧布局是最简单的布局对象,它被定制为用户屏幕上的一个空白备用区域,之后用户可以在其中填充一个单一对象,例如一张图片等。所有的子元素将会固定在屏幕左上角;我们不能为FrameLayout中的一个子元素指定一个位置。而且新增的子元素将会直接覆盖填充旧的子元素,类似于一个栈结构,当然也不一定是全部挡住,这样看透明度以及大小来决定。 <FrameLayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:foreground="#ff0000" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/loginName" android:textSize="@dimen/dp50"/> <TextView android:layout_width="wrap_content" android