国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Android > 正文

Android手機衛士之設置密碼對話框

2019-12-12 05:06:54
字體:
來源:轉載
供稿:網友

本文實現初次設置密碼驗證過程,首先實現如下效果

布局如下:

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView style="@style/TitleStyle" android:background="#f00" android:text="設置密碼" /> <EditText android:id="@+id/et_set_psd" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="設置密碼" /> <EditText android:id="@+id/et_confirm_psd" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="確認密碼" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <Button  android:id="@+id/bt_submit"  android:layout_width="0dp"  android:layout_height="wrap_content"  android:layout_weight="1"  android:text="確認" /> <Button  android:id="@+id/bt_cancel"  android:layout_width="0dp"  android:layout_height="wrap_content"  android:layout_weight="1"  android:text="取消" /> </LinearLayout></LinearLayout>

其中TitleStyle的代碼如下:

<resources> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. --> <style name="AppBaseTheme" parent="android:Theme.Light"> <!--  Theme customizations available in newer API levels can go in  res/values-vXX/styles.xml, while customizations related to  backward-compatibility can go here. --> </style> <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> <!-- 在去頭的同時還保持高版本的樣式主題 --> <!-- All customizations that are NOT specific to a particular API-level can go here. --> <item name="android:windowNoTitle">true</item> </style> <style name="TitleStyle"> <item name="android:gravity">center</item> <item name="android:textSize">20sp</item> <item name="android:textColor">#000</item> <item name="android:padding">10dp</item> <item name="android:background">#0f0</item> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> </style></resources>

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持武林網。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 巢湖市| 临沭县| 介休市| 修水县| 崇礼县| 嘉祥县| 信丰县| 潮安县| 宝鸡市| 两当县| 海丰县| 贵港市| 襄城县| 巴东县| 云霄县| 探索| 波密县| 广饶县| 舒兰市| 贺州市| 黄骅市| 吉木乃县| 兴安县| 齐河县| 手游| 山西省| 康平县| 隆回县| 新泰市| 临清市| 贵南县| 依安县| 上饶县| 沈丘县| 古丈县| 金华市| 资兴市| 高邑县| 沧州市| 平乡县| 额敏县|