欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

XML布局文件的示例分析-創(chuàng)新互聯(lián)

這篇文章主要為大家展示了“XML布局文件的示例分析”,內(nèi)容簡(jiǎn)而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“XML布局文件的示例分析”這篇文章吧。

武威ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場(chǎng)景,ssl證書(shū)未來(lái)市場(chǎng)廣闊!成為創(chuàng)新互聯(lián)公司的ssl證書(shū)銷售渠道,可以享受市場(chǎng)價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18982081108(備注:SSL證書(shū)合作)期待與您的合作!

XML布局文件

在文件夾res/layout中存放著xml格式的布局文件

布局方式主要是LinearLayout(線性布局) 、TableLayout(表格布局)、RelativeLayout(相對(duì)布局)

當(dāng)然還有AbsoluteLayout、(絕對(duì)布局)、FrameLayout(幀布局)等等

他們之間也可以通過(guò)嵌套達(dá)到更好的界面效果

我按照個(gè)人的理解將常用的屬性整理了一下

可能不科學(xué) 但我認(rèn)為很實(shí)用。

控件為整體:

android:id                                                地址

android:width                                           寬度

android:height                                         高度

android:layout_width                               寬(fill_parent/wrap_content)

android:layout_height                             高(fill_parent/wrap_content)

android:layout_margin(Left/Top/Right/Bottom)    外邊距(*dip)

android:layout_weight                             比重

控件內(nèi)容:

android:text                                         文本內(nèi)容

android:textSize                                   文本大小

android:gravity                                     內(nèi)容基本位置

android:background                               背景色(RBG)

android:padding(Left/Top/Right/Bottom)    內(nèi)邊距(*dip)

android:singleLine                                  內(nèi)容同行顯示(true/false)

相對(duì)布局:

android:layout_above                                下邊與誰(shuí)的上邊對(duì)齊(id)

android:layout_below                                 上邊與誰(shuí)的下邊對(duì)齊(id)

android:layout_toLeftOf                             右邊與誰(shuí)的左邊對(duì)齊(id)

android:layout_toRightOf                           左邊與誰(shuí)的右邊對(duì)齊(id)

android:layout_alignTop                            上邊與誰(shuí)的上邊對(duì)齊(id)

android:layout_alignBottom                       下邊與誰(shuí)的下邊對(duì)齊(id)

android:layout_alignLeft                            左邊與誰(shuí)的左邊對(duì)齊(id)

android:layout_alignRight                          右邊與誰(shuí)的右邊對(duì)齊(id)

android:layout_alignParentTop                  上邊與父控件的上邊對(duì)齊(true/false)

android:layout_alignParentBottom             下邊與父控件的下邊對(duì)齊(true/false)

android:layout_alignParentLeft                  左邊與父控件的左邊對(duì)齊(true/false)

android:layout_alignParentRight                右邊與父控件的右邊對(duì)齊(true/false)

android:layout_centerInParent                   相對(duì)父控件居中(true/false)

android:layout_centerHorizontal                 相對(duì)父控件水平方向居中(true/false)

android:layout_centerVertical                     相對(duì)父控件垂直方向居中(true/false)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

下面給出我剛做好的注冊(cè)頁(yè)面

<?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"
    android:padding="10dip"
    >
    
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    >
 
<TextView 
    android:text="歡迎注冊(cè)" 
    android:gravity="center"
    android:textSize="15pt"
    android:textColor="#ff8c00"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    ></TextView>
 
<TextView 
    android:text=" 性別/Gender" 
    android:textSize="8pt"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    ></TextView>
<RadioGroup android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/genderGroup" android:orientation="horizontal">
<RadioButton android:id="@+id/maleButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="男"></RadioButton>
<RadioButton android:id="@+id/femaleButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="女"></RadioButton>

</RadioGroup>
 
<TextView 
    android:text=" 用戶名/User" 
    android:textSize="8pt"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    ></TextView>
<EditText 
    android:id="@+id/user" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    ></EditText>
 
<TextView 
    android:text=" 密碼/Password" 
    android:textSize="8pt"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    ></TextView>
<EditText 
    android:id="@+id/password" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    ></EditText>
 
<TextView 
    android:text=" 重復(fù)密碼/Re-type Password" 
    android:textSize="8pt"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    ></TextView>
<EditText 
    android:id="@+id/rpassword" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    ></EditText>
 
<CheckBox 
    android:text="同意注冊(cè)條款*" 
    android:id="@+id/CheckBox01" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"
    ></CheckBox>
 
</LinearLayout>
 
<TableRow 
    android:layout_alignParentBottom="true"
    android:id="@+id/TableRow01" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content">
<Button 
    android:id="@+id/confirm" 
    android:text="confirm" 
    android:textSize="10pt"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_weight="1" 
    ></Button>
<Button 
    android:textSize="10pt" 
    android:text="cancel" 
    android:layout_width="wrap_content" 
    android:id="@+id/cancel" 
    android:layout_height="wrap_content"
    android:layout_weight="1"
    ></Button>
</TableRow>
</RelativeLayout>

XML布局文件的示例分析

以上是“XML布局文件的示例分析”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

分享標(biāo)題:XML布局文件的示例分析-創(chuàng)新互聯(lián)
本文地址:http://aaarwkj.com/article42/ddoohc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)、微信小程序、網(wǎng)站內(nèi)鏈、全網(wǎng)營(yíng)銷推廣、靜態(tài)網(wǎng)站、網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名
欧美亚洲另类在线日韩国产| 亚洲成av人天堂影院| 日本不卡的三区四区五区| 国产一区二区三区性色| 久久熟妇少妇亚洲精品| 国产精品偷拍自拍视频| 野花日本免费高清完整| 性感美女国产精品一区二区| 日本亚洲中文字幕无吗| 日韩精品视频一区二区在线观看| 久久伊人亚洲中文字幕| 黄色国产传媒在线播放| 亚洲国产黄色美女视频| 欧美日韩精品综合国产| 特黄一级黄色大片免费看| 大香蕉国产精品视频在线| 国产日韩久久免费电影| 激情一区二区三区视频| 欧美精品青青久久久久久| 日韩有码大片最新自拍| 国产伦理免费精品中文字幕| 国产午夜男人天堂手机| 亚洲av中文久久精品国内| 日本在线一区二区视频麻豆| 国产精品一区在线播放| 日韩精品中文一区二区| 97国产精品视频在线观看| 欧美日韩精品不卡在线播放| 国产姐弟操大率悠荡笕| 日韩不卡在线免费播放| 岛国高清乱码中文字幕| 老湿机午夜十分钟视频| 青青草老司机在线视频| 久久青草视频在线观看| 亚洲精品一区二区三区网站| 国产成人综合欧美日韩另类| 91免费版在线观看网址| 开心五月婷婷六月丁香| 亚洲香蕉av一区二区蜜桃| 亚洲精品国产av一区二区三区| 不卡视频一区中文字幕|