1. <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. xmlns:tools="http://schemas.android.com/tools"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:gravity="center_vertical"
  6. android:stretchColumns="0,3"
  7. >
  8. <TableRow
  9. android:layout_width="wrap_content"
  10. android:layout_height="wrap_content"
  11. >
  12. <TextView/>
  13. <TextView
  14. android:textSize="24px"
  15. android:text="@string/hello_world"
  16. android:layout_width="wrap_content"
  17. android:layout_height="wrap_content"/>
  18. <EditText
  19. android:layout_width="wrap_content"
  20. android:minWidth="145dp"
  21. android:layout_height="wrap_content"/>
  22. <TextView/>
  23. </TableRow>
  24. <TableRow
  25. android:layout_width="wrap_content"
  26. android:layout_height="wrap_content"
  27. >
  28. <TextView/>
  29. <TextView
  30. android:textSize="24px"
  31. android:text="@string/hello_world"
  32. android:layout_width="wrap_content"
  33. android:layout_height="wrap_content"/>
  34. <EditText
  35. android:layout_width="wrap_content"
  36. android:minWidth="145dp"
  37. android:layout_height="wrap_content"/>
  38. <TextView/>
  39. </TableRow>
  40. <TableRow
  41. android:layout_width="wrap_content"
  42. android:layout_height="wrap_content"
  43. >
  44. <TextView/>
  45. <TextView
  46. android:textSize="24px"
  47. android:text="@string/hello_world"
  48. android:layout_width="wrap_content"
  49. android:layout_height="wrap_content"/>
  50. <EditText
  51. android:layout_width="wrap_content"
  52. android:minWidth="145dp"
  53. android:layout_height="wrap_content"/>
  54. <TextView/>
  55. </TableRow>
  56. </TableLayout>



android:stretchColumns="0,3"


拉伸第一个和第4个 这个属性在tablelayout布局里使用
制作登录界面的布局时候,可以使用


来自为知笔记(Wiz)

更多相关文章

  1. selector
  2. android listview 的一些属性
  3. 相对布局 RelativeLayout 常用属性介绍
  4. Android(安卓)RelativeLayout用到的一些重要的属性
  5. android布局属性预览
  6. Android(安卓)xml ListView 的divider属性
  7. 刚刚接触Android,写第一个Hello world 小项目笔记
  8. android:layout_gravity和android:gravity属性的区别
  9. 『ANDROID』android:layout_gravity和android:gravity属性的区别

随机推荐

  1. Android(安卓)Handler的使用
  2. Android(安卓)图片剪切框架 uCrop 简单集
  3. Android开启手电筒功能(完美适配Android4x
  4. bitmap与canvas android
  5. Android: Project ... is missing requir
  6. 【转】java 总结:泛型
  7. Android(安卓)PowerManager
  8. Android(安卓)Plugin with id 'com.andro
  9. Android(安卓)7.0修改系统时间
  10. 关于android 版本更新中“java.lang.Secu