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的距离;

更多相关文章

  1. Android基础UI之ImageView宽度设定,高度自适应
  2. Android修改屏幕亮度
  3. android之布局xml各种控件属性详解
  4. Android(安卓)设定横屏,禁止屏幕旋转,Activity重置 [更新视频播放
  5. Android(安卓)shape使用详解
  6. android一些有用的View属性
  7. 浅谈android的selector,背景选择器(看着有用就转载了)
  8. android 游戏OpenGL学习笔记1
  9. Android(安卓)Studio推荐几个非常有用的工具

随机推荐

  1. c语言颜色代码
  2. c++如何读取excel
  3. c语言的注释定界符是什么
  4. vb数组怎么定义
  5. c程序怎么编写x的y次方
  6. devc如何恢复默认设置
  7. mod在vb中什么意思
  8. C语言注释详解
  9. putchar("\n")是什么意思
  10. c语言万年历程序代码