版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
第Android實(shí)現(xiàn)注冊界面本文實(shí)例為大家分享了Android實(shí)現(xiàn)注冊界面的具體代碼,供大家參考,具體內(nèi)容如下
LinearLayout控制布局
TextView用于顯示文字
EditText輸入框
RadioGroup單選按鈕和RadioButton一起用
CheckBox復(fù)選框
Spinner下拉框
源碼:
register.xml
xmlversion="1.0"encoding="utf-8"
LinearLayoutxmlns:android="/apk/res/android"
android:orientation="vertical"android:layout_width="match_parent"
android:layout_height="match_parent"
LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginTop="10dp"
android:text="用戶名:"
android:textSize="15dp"
android:textColor="@color/colorPrimary"
/
EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginTop="10dp"
android:hint="輸入2-10個字符"
android:textColor="@color/colorPrimary"
android:layout_weight="1"/
/LinearLayout
LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginTop="10dp"
android:text="密碼:
"
android:textSize="15dp"
android:textColor="@color/colorPrimary"
/
EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginTop="10dp"
android:hint="輸入6-10個字符"
android:textColor="@color/colorPrimary"
android:layout_weight="1"/
/LinearLayout
LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginTop="23dp"
android:text="性別選擇:
"
android:textSize="15dp"
android:textColor="@color/colorPrimary"
/
RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="6dp"
android:text="男"/
RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="6dp"
android:text="女"/
/RadioGroup
/LinearLayout
LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="6dp"
android:textSize="15dp"
android:text="愛好選擇:"
android:textColor="@color/colorPrimaryDark"/
CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginLeft="20dp"
android:text="游泳"/
CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginLeft="20dp"
android:text="打球"/
CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginLeft="20dp"
android:text="看書"/
/LinearLayout
LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="6dp"
android:textSize="15dp"
android:text="所在地"/
Spinner
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginLeft="10dp"
android:entries="@array/citys"
/Spinner
/LinearLayout
Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="注冊"
android:textColor="@color/colorPrimaryDark"/
/LinearLayout
strings.xml
resources
stringname="app_name"Register/string
string-arrayname="citys"
item贛州/item
item上海/item
item廣州/item
item深圳/item
item北京/item
item湖南/item
item湖北/item
item南寧/item
item廈門/item
/string-array
/resources
Main.java
packagecom.example.hsy.register;
importandroid.support.v7.app.AppCompatActivit
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 廣播電視線務(wù)員安全規(guī)程模擬考核試卷含答案
- 鐵渣處理工QC考核試卷含答案
- 水生植物病害防治員崗前設(shè)備巡檢考核試卷含答案
- 筒并搖工標(biāo)準(zhǔn)化強(qiáng)化考核試卷含答案
- 海克斯三坐標(biāo)培訓(xùn)課件
- 老年人入住老人關(guān)愛活動制度
- 城管協(xié)管培訓(xùn)
- 酒店客房環(huán)境與設(shè)備維護(hù)制度
- 酒店安全消防管理制度
- 濟(jì)寧培訓(xùn)班教學(xué)課件
- 河北省邢臺市2025-2026學(xué)年七年級上學(xué)期期末考試歷史試卷(含答案)
- 2026屆南通市高二數(shù)學(xué)第一學(xué)期期末統(tǒng)考試題含解析
- 寫字樓保潔培訓(xùn)課件
- 2026中國電信四川公用信息產(chǎn)業(yè)有限責(zé)任公司社會成熟人才招聘備考題庫有完整答案詳解
- 計(jì)量宣貫培訓(xùn)制度
- 2026中國電信四川公用信息產(chǎn)業(yè)有限責(zé)任公司社會成熟人才招聘備考題庫有答案詳解
- 《老年服務(wù)禮儀與溝通技巧》-《老年服務(wù)禮儀與溝通技巧》-老年服務(wù)禮儀與溝通技巧
- 社會學(xué)概論(第2版)PPT完整全套教學(xué)課件
- RB/T 208-2016化學(xué)實(shí)驗(yàn)室內(nèi)部質(zhì)量控制比對試驗(yàn)
- GB/T 37898-2019風(fēng)力發(fā)電機(jī)組吊裝安全技術(shù)規(guī)程
- GB/T 32893-201610 kV及以上電力用戶變電站運(yùn)行管理規(guī)范
評論
0/150
提交評論