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

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)化排名
成人黄色动漫在线播放 | 久久夜色精品亚洲国产| 亚洲人妻在线一区二区三区| 日韩中文字幕一二三| 一卡二卡三卡四卡日韩| 好看毛片一区二区三区四区| 国产九色91中文在线视频| 日本束缚人妻一区二区三区| 日韩精品在线观看你懂的| 亚洲中文字幕伦理在线| av在线高清免费观看| 日本人妻系列在线播放| 国产欧美日韩另类在线| 欧美日韩一区二区三区四区在线观看| 亚洲成av人一区二区三区| 亚洲国产日韩欧美综合久久| 久久婷婷激情亚洲综合色| 亚洲精品中文字幕乱码| 日本丰满熟女毛茸茸的黑逼| 最新91精品手机国产在线| 99热精品综合在线观看| 天天免费日日夜夜夜夜| 精品国产成人一区二区| 日本一区二区三区日本| 国产av剧情同事肉体秘密| 精品一区二区日韩在线| 国产乱码精品免费一区二区av| 欧美熟女av在线观看| 激情男女一区二区三区| 精品人妻av中文字幕| 日麻批视频在线免费观看| 国产一区二区欧美精品| 日本91一区二区不卡| 亚洲国产精品欧美激情| 香蕉网性欧美在线视频| 门国产av一区二区三区| 青青草原激情综合网| 国产美女高潮流白浆视频免费看| 日韩亚洲毛片全在线播放| 日本av免费观看一区二区| 日本人妻伦理在线播放|