欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android手機衛(wèi)士之設(shè)置密碼對話框

 更新時間:2016年10月09日 10:00:54   作者:wuyudong  
這篇文章主要為大家詳細介紹了Android手機衛(wèi)士之設(shè)置密碼對話框,具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實現(xiàn)初次設(shè)置密碼驗證過程,首先實現(xiàn)如下效果

布局如下:

<?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="設(shè)置密碼"
 />

 <EditText
 android:id="@+id/et_set_psd"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:hint="設(shè)置密碼"
 />

 <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>

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論