android學習記錄(四)管理裡中基本組鍵

來源:互聯網
上載者:User

標籤:

1.線性布局管理器<LinearLayout xmlns:android=http://schemas.android.com/apk/res/android>

</ LinearLayout >

  Androidorientation 用於設定布局管理器內組件的相片順序(ertical(垂直)、horizontal(水平))

  Android:gravity 用於設定管理員內組件的對齊(top、bottom、left、right等)

  Android:layout_width 用於設定管理員內組件的基本寬度(fill_parent、match_parent、wrap_conent)

  Android:layout_height 用於設定布局管理器內組件的基本高度(fill_parent、match_parent、wrap_conent)

  Android:id 為當前組件設定一個id屬性

  Android:background 用於為該組件設定背景

2. 絕對布局管理器<AbsoluteLayout xmlns:

android="http://schemas.android.com/apk/res/android" ></AbsoluteLayout>

  android:layout_x="20px" 使用layout_x精確控制座標

android:layout_y="10px"使用layout_y精確控制座標

3.架構布局管理器<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android”>

</FrameLayout>

 Android:foreground 設定該架構版面配置容器的前景映像

 Android:foregroundGravity 定義繪製前景映像的gravity屬性,也就是前景映像顯示的位置

4.相對布局管理器<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android">

</RelativeLayout> 按照組件之間的相對位置來進行布局的,如某個組件在另一個組件的左邊、上邊等、

android:gravity 用於設定布局管理器中各個組件的對齊

android:ignoreGravity 用於制定哪個組件不受gravity屬性的影響

android:layout_above 用於指定該組件位於那個組件的上方

android:layout_alibnBottom用於指定該組件與哪個組件的下邊界對齊

android:layout_alibnLeft 用於指定該組件與哪個組件的左邊界對齊

android:layout_alibnParenBottom 用於指定該組件是否與布局管理器底端對齊

android:layout_alibnParenTop 用於指定該組件是否與布局管理器底頂端對齊

android:layout_alibnParenRight 用於指定該組件是否與布局管理器右端對齊

android:layout_alibnParenLeft 用於指定該組件是否與布局管理器左端對齊

android:layout_below 用於指定該組件位於那個組件的下方

android:layout_centerHorizontal 用於指定該組件是否位於布局管理器水平置中的位置

android:layout_centerInParent 用於指定該組件是否位於布局管理器中央的位置

android:layout_centerVertical 用於指定該組件是否位於布局管理器垂直置中的位置

android:layout_yoLeftOf 用於指定該組件位於哪個組件的左側

android:layout_yoRightOf 用於指定該組件位於哪個組件的右側

5表格版面配置管理器<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"></TableLayout>

  android:collapseColumns  設定需要被隱藏的列的序號(序號從0開始),多個序號之間用分號隔開

  android:shrinkColumns  設定允許被收縮的列的序號(序號從0開始),多個序號之間用分號隔開

  android:stretchColumns  設定允許被展開的列的序號(序號從0開始),多個序號之間用分號隔開

  (表格版面配置管理器就是線上性布局管理器上 加了改動。本來線性布局管理器只是在一行一個組件,而表格版面配置管理器可以是多個。)

android學習記錄(四)管理裡中基本組鍵

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.