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

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网黑人| 中文字幕你懂的在线观看| 精品国产成人一区二区| 国产午夜在线影院一区二区| 国产一区二区高清在线| 女同亚洲一区二区三区| 国产亚洲精品久久久9| 国产精品久久乱码综合| 午夜福利精品在线观看| 久久亚洲中文字幕精品熟女一区| 亚洲一区二区三区精品乱码| 粉嫩极品美女国产精品| 无遮挡无掩盖的免费网站| 亚洲福利影院一区久久| av 一区二区三区av| 国产精品一区二区免费式| 国产亚洲一区二区高清| 亚洲欧美综合另类久久| 我想看日韩一级黄色片| 深夜三级福利在线观看| 日韩看片一区二区三区高清| 久久精品成人无码观看56| 日本福利资源在线观看| 久久不卡高清免费av| 亚洲成人久久久久久久| 在线最新亚洲日本韩国| 国产情侣最新地址在线| 日韩国产推荐一区二区| 亚洲精品国产二区中文字幕| 国产高潮精品呻吟久久av| 欧美一区二区三区蜜桃| 国产亚洲欧美日韩网站| 亚洲一区二区三区久久精品| 日本一区二区三级在线观看| 日韩欧美高清一区二区| 亚洲国产精品区一区二区| 尤物视频官网在线观看| 国产一区二区三区精品久久| 一区二区三区国产激情| 国产精品重口调教系列| av中文字幕一二三区|