RelativeLayout相对布局所谓相对布局,即第二个控件的摆放,为第一个控件的相对位置<TextView     android:id="@+id/textView1"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:background="#FF0000"    android:text="第一个"    /><TextView     android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:background="#00ff00"    android:text="第二个"    android:layout_toRightOf="@id/textView1"//控件摆放在id为textView1控件的右边    />@id,为引用一个已经创建好的控件id@+id,为创建一个新的控件idandroid:layout_toLeftOf摆放在左边android:layout_below摆放在下边android:layout_above摆放在上边android:layout_alignRight="@id/textView1"对齐到右边

更多相关文章

  1. Android设置任何控件透明度
  2. Android 控件及其属性2
  3. Android学习笔记06-线性布局LinearLayout
  4. Andorid学习笔记(ADT)-常见的UI布局
  5. Android四大布局
  6. Android 布局中如何使控件居中
  7. AS Layout布局

随机推荐

  1. 安卓入门.RelativeLayout相对布局1
  2. Android开发,使用xml drawable制作带边框
  3. Android(安卓)R Launcher3抽屉显示所有应
  4. 2021-01-06
  5. android fragment(android.support.v4.app
  6. Android(安卓)核心分析 之七------Servic
  7. 安卓巴士Android开发神贴整理
  8. Android入门
  9. Android开发环境的搭建
  10. Android(安卓)Init Language(安卓初始化