<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1">
<!--
android:stretchColumns="1"是设置 TableLayout所有行的第二列为扩展列。
也就是说如果每行都有三列的话,剩余的空间由第二列补齐
-->
<TableRow>
<!-- 从第二列开始填写 -->
<TextView
android:layout_column="1"
android:text="Open..."
android:padding="3dip" />
<!-- 字符四周到TextView的 空白边的大小 -->
<!-- 设置TextView内字符的对其方式 此为右对齐 与layout_gravity的区别-->
<TextView
android:text="Ctrl-O"
android:gravity="right"
android:padding="3dip" />
</TableRow>

<TableRow>
<TextView
android:layout_column="1"
android:text="Save..."
android:padding="3dip" />
<TextView
android:text="Ctrl-S"
android:gravity="right"
android:padding="3dip" />
</TableRow>

<TableRow>
<TextView
android:layout_column="1"
android:text="Save As..."
android:padding="3dip" />
<TextView
android:text="Ctrl-Shift-S"
android:gravity="right"
android:padding="3dip" />
</TableRow>

<!-- 加一个分割线 线的高度为2 View是TextView的父类颜色 -->
<View
android:layout_height="2dip"
android:background="#FF909090" />

<TableRow>
<TextView
android:text="X"
android:padding="3dip" />
<TextView
android:text="Import..."
android:padding="3dip" />
</TableRow>

<TableRow>
<TextView
android:text="X"
android:padding="3dip" />
<TextView
android:text="Export..."
android:padding="3dip" />
<TextView
android:text="Ctrl-E"
android:gravity="right"
android:padding="3dip" />
</TableRow>

<View
android:layout_height="2dip"
android:background="#FF909090" />

<TableRow>
<TextView
android:layout_column="1"
android:text="Quit"
android:padding="3dip" />
</TableRow>
</TableLayout>

更多相关文章

  1. android系统开发小问题-启动过程中android字符没有显示出来
  2. Android Studio如何轻松整理字符串到string.xml中
  3. Android实现DES对字符串加密
  4. Android 让你的 EditText 只接受指定字符
  5. Android中判断字符串中必须包含字母或者数字_Android
  6. android 复制、粘贴字符串 (判断API 11 )
  7. NDK编译Android字符界面的可执行程序
  8. Android 4.0+ 版本中的EditText字符重叠问题
  9. Android实现TextView字符串波浪式跳动

随机推荐

  1. android典型代码系列(二十六)------App w
  2. start of WindowManagerService
  3. Android放大镜实现的两种方式
  4. Android webview doesn't display web pa
  5. Android语言国际化values资源文件命名规
  6. Android的AlertDialog的6种使用情景
  7. android系统提供的几种颜色Color
  8. Android AsyncTask实例
  9. android 文件名长度限制
  10. android实现gallery一个一个滑动