Android手机卫士之设置密码对话框
作者:wuyudong 发布时间:2021-08-03 07:24:27
标签:Android,密码,对话框
本文实现初次设置密码验证过程,首先实现如下效果
布局如下:
<?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>
来源:http://www.cnblogs.com/wuyudong/archive/2016/10/08/5939823.html


猜你喜欢
- 1 什么是cookie浏览器与WEB服务器之间是使用HTTP协议进行通信的,当某个用户发出页面请求时,WEB服务器只是简单的进行响应,然后就
- 在优雅的使用枚举参数(原理篇)中我们聊过,Spring对于不同的参数形式,会采用不同的处理类处理参数,这种形式,有些类似于策略模式。将针对不
- 本文实例讲述了C#静态构造函数用法。分享给大家供大家参考。具体如下:当我们想初始化一些静态变量的时候,就需要用到静态构造函数了。这个静态构造
- 本文实例为大家分享了javaweb登录验证码的具体代码,供大家参考,具体内容如下使用:Controller:生成验证码@RequestMap
- springboottest测试依赖和使用<dependency> <groupId>or
- 计算机在执行程序时,为了提高性能,编译器和处理器常常会对指令重排,一般分为以下三种:源代码 -> 编译器优化的重排 -> 指令并
- 本文实例讲述了C#按字节数截取字符串并在后面加上省略号...的方法,这是一个自定义的C#函数,函数的使用说明如下:<param nam
- 本文基于jdk1.8进行分析关于HashMap的简介,可以参考这篇文章https://www.jb51.net/article/154177
- 一、基本介绍 1、介绍学习很多算法知识,力争做到最优解的学习过程中,很多时候都会遇到PriorityQueue(优先队列)。一个基
- 需求是需要在一个已经存在的页面添加一个可拖动的浮层广告。使用到的技术:ViewDragHelper效果如图:封装好的类(继承自FrameLa
- 经度指示南北方向,纵向纬度指示东西方向,横向获取经纬度使用GPS权限:<uses-permission android:name=&q
- Java游戏俄罗斯方块的实现实例 java小
- 1.背景倒计时的效果在网站或其他平台看到的很多了吧,今天就让我们来看看在OpenHarmony中如何实现它吧!2.效果预览视频效果演示传送门
- java怎么判断三位数先定义个测试数字,如图然后可以把数字转换成字符串来判断它的长度是否为3,如图获取判断数字范围是否在100到1000之间
- 下面是我自己收集整理的2017年Java岗位的面试题,可以用它来好好准备面试。一、Java基础1. String类为什么是final的。2.
- springboot微服务内置了tomcat,在工程目录下执行:mvn clean package,可以将项目打成jar,通过java -j
- 一、需求C#种的下拉框ComboBox不支持下拉复选框列表与下拉树形列表等,系统中需要用到的地方使用了第三方组件,现在需要将第三方组件替换掉
- 在项目中为了友好化,对于错误页面,我们常常会使用自定义的页面。SSM框架组合时代,我们通常通过拦截或者在web.xml中设置对于错误码的错误
- 目标多级表头、分页、动态数据实现依赖<!-- poi工具类--> &nbs
- 本文实例讲述了C#关闭指定名字进程的方法。分享给大家供大家参考。具体实现方法如下:public static void stopNamedP