首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 其他相关 >

RelativeLayout的格局学习(部分知识点)

2012-11-10 
RelativeLayout的布局学习(部分知识点)1.这个是APIDemo中的布局格式:?xml version1.0 encodingutf-8

RelativeLayout的布局学习(部分知识点)
1.这个是APIDemo中的布局格式:

<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="fill_parent"    android:layout_height="fill_parent">    <TextView        android:id="@+id/label"        android:layout_width="fill_parent"        android:layout_height="wrap_content"        android:text="Type here:"/>    <EditText        android:id="@+id/entry"        android:layout_width="fill_parent"        android:layout_height="wrap_content"        android:background="@android:drawable/editbox_background"        android:layout_below="@id/label"/>    <Button        android:id="@+id/ok"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_below="@id/entry"        android:layout_alignParentRight="true"        android:layout_marginLeft="10dip"        android:text="OK" />    <Button        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_toLeftOf="@id/ok"        android:layout_alignTop="@id/ok"        android:layout_above="@id/ok"        android:text="Cancel" /></RelativeLayout>


1.这里面比较有用的部分1)
  android:background="@android:drawable/editbox_background"

2.android:layout_marginLeft="10dip"是设定后续如果有放在左面的View就默认间隔10dp的距离;
引号里的内容麻烦楼主可以再解释一下吗?

热点排行