cloudzhou

           

          android學習筆記(二)

          LinearLayout:線性布局.可以使用垂直線形布局,也可以使用水平布局,在LinearLayout里面可以放多個控件,但是一行(列)只能放一個控件.
          android:orientation = "vertical"  垂直方式排列
          android:orientation = "horizontal" 水平方式排列

          RelativeLayout:相對布局.RelativeLayout里面可以放多個控件,不過控件的位置都是相對位置.
          android:layout_below = "@id/label"  運用上一個標簽id縮定上一個標簽的相對位置,將自身標簽排列在其下.
          android:layout_toLeftOf = "@id/label" 將自身標簽縮定在上一個標簽之左.
          android:layout_alignTop = "@id/label" 將自身標簽縮定和上一個標簽相同高度.

          TableLayout:表單布局.這要和TableRow配合使用,很像HTML里面的TABLE.
          <TableLayout
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:stretchColumns="1">
          <TableRow>
              <TextView
                  android:layout_column="1"
                  android:text="打開..."
                  android:padding="3dip"/>
              <TextView
                  android:text="Ctrl-O"
                  android:gravity="right"
                  android:padding="3dip"/>
          </TableRow>
          </TableLayout>

          posted on 2011-02-23 14:22 周曉磊 閱讀(65) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          導航

          統計

          留言簿

          文章檔案

          搜索

          最新評論

          主站蜘蛛池模板: 长武县| 松溪县| 子长县| 萍乡市| 祁门县| 清苑县| 岗巴县| 广灵县| 海口市| 香港| 峡江县| 祁连县| 龙井市| 大冶市| 梓潼县| 喜德县| 尼木县| 禄丰县| 伊川县| 南召县| 漠河县| 昌平区| 普定县| 沈丘县| 安阳县| 望都县| 韶关市| 张家口市| 沙雅县| 舒兰市| 隆尧县| 平谷区| 甘肃省| 辉县市| 通河县| 余干县| 宜州市| 墨江| 喀喇沁旗| 隆德县| 巴彦淖尔市|