设置向导页面,通过SharedPreferences来判断是否已经设置过了,跳转到不同的页面

自定义样式

在res/values/styles.xml中

添加节点<style name=””>,设置名称属性

在<style>节点里面,添加节点<item name=””>设置名称属性,就是布局的各种参数

在<item>的文本里面,设置布局的各种参数值

在布局文件中引用样式,style=”@style/xxxxxxxxxxxx”

在TextView的左侧放置小图标

使用左侧图标属性android:drawableLeft=”@android:drawable/xxxxxxxxxxx”,引用android系统的图标,例如:@android:drawable/star_big_on

图标垂直居中对齐,使用对齐属性 android:gravity=”center_vertical”

引导页下面的小圆点

线性布局,横向,ImageView,包裹内容,整体居中

使用系统图标 @android:drawable/presence_online

@android:drawable/presence_invisible

自定义按钮状态背景

在res/drawable/button.xml文件中定义,添加节点<selector>

定义按钮按下状态 添加<item>节点,设置状态属性android:state_pressed=”true”

设置图片属性android:drawable=”xxxx”

设置按钮焦点状态 添加<item>节点,设置状态属性android:state_focus=”true”

定义按钮默认图片 添加<item>节点,设置图片属性android:drawable=”xxxx”

设置图片属性android:drawable=”xxxx”

布局文件中,给按钮设置背景,android:background=”@drawable/xxxxx”

activity_lost_find.xml

<?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" ><TextViewandroid:layout_width="match_parent"android:layout_height="40dp"android:background="#2D89EF"android:gravity="center"android:text="1.手机防盗设置向导"android:textColor="#fff"android:textSize="18sp" /><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginLeft="10dp"android:layout_marginTop="8dp"android:text="手机防盗包含以下功能:"android:textSize="16sp" /><TextViewstyle="@style/guide_text_list"android:drawableLeft="@android:drawable/btn_star_big_on"android:text="SIM卡变更报警" /><TextViewstyle="@style/guide_text_list"android:drawableLeft="@android:drawable/btn_star_big_on"android:text="GPS追踪" /><TextViewstyle="@style/guide_text_list"android:drawableLeft="@android:drawable/btn_star_big_on"android:text="远程数据销毁" /><TextViewstyle="@style/guide_text_list"android:drawableLeft="@android:drawable/btn_star_big_on"android:text="远程锁屏" /><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:gravity="center_horizontal"android:orientation="horizontal" ><ImageViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@android:drawable/presence_online" /><ImageViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@android:drawable/presence_invisible" /><ImageViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@android:drawable/presence_invisible" /><ImageViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:src="@android:drawable/presence_invisible" /></LinearLayout><RelativeLayoutandroid:layout_width="match_parent"android:layout_height="match_parent" ><Buttonandroid:textColor="#444"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_alignParentBottom="true"android:layout_alignParentRight="true"android:layout_marginBottom="10dp"android:layout_marginRight="10dp"android:background="@drawable/button_selector"android:text="下一步" /></RelativeLayout></LinearLayout>

button_selector.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"><item android:drawable="@drawable/barcode_btn_guide_pressed" android:state_focused="true"></item><item android:drawable="@drawable/barcode_btn_guide_pressed" android:state_pressed="true"></item><item android:drawable="@drawable/barcode_btn_guide_normal"></item></selector>

转载于:https://www.cnblogs.com/taoshihan/p/5373836.html

[android] 手机卫士设置向导页面相关推荐

  1. android 系统设置向导,详解Android 手机卫士设置向导页面

    推荐阅读: 设置向导页面,通过SharedPreferences来判断是否已经设置过了,跳转到不同的页面 自定义样式 在res/values/styles.xml中 添加节点 在 在的文本里面,设置布 ...

  2. android手机卫士、3D指南针、动画精选、仿bilibli客户端、身份证银行卡识别等源码...

    Android精选源码 android身份证.银行卡号扫描源码 android仿bilibili客户端 android一款3D 指南针 源码 android手机卫士app源码 android提醒应用, ...

  3. android确认密码代码,Android手机卫士之确认密码对话框

    本文接着实现"确认密码"功能,也即是用户以前设置过密码,现在只需要输入确认密码 布局文件和<Android 手机卫士--设置密码对话框>中的布局基本类似,所有copy一 ...

  4. android 短信位置,浅析Android手机卫士之手机实现短信指令获取位置

    推荐阅读: 获取位置 新建一个service的包 新建一个GPSService类继承系统的Service类 清单文件中注册一下 重写onCreate()方法,服务创建的时候回调 重写onDestroy ...

  5. 手机卫士 java_[Java教程]Android 手机卫士2

    [Java教程]Android 手机卫士2 0 2016-10-17 21:00:07 1,自定义获取焦点的TextView FocusTextView.java 1 package com.ithe ...

  6. android手机卫士,安卓手机卫士

    权限列表[安卓手机卫士] ● (基于网络的)粗略位置 访问粗略的位置源(例如蜂窝网络数据库)以确定手机的大体位置(如果可以).恶意应用程序可借此确定您所处的大体位置. ● 获取定位 允许应用通过网络或 ...

  7. Android 手机卫士(1)

    Android的开发之神兵利器[Android真机/Android模拟器] 否则光秃秃的对着代码,对着UI,很枯燥de~ 我想在座de各位学习Android也正是因为有趣的可视化开发@大家 想要在手机 ...

  8. [android] 手机卫士欢迎细节和主界面

    splash界面的细节 ctrl + O 搜索 在去标题的时候,对话框主题被去掉了,有点丑,现在既要有新版本的对话框又不显示标题 把清单文件中activity节点的主题去掉 进入到applicatio ...

  9. [android] 手机卫士黑名单功能(列表展示)

    先把要拦截的电话号码保存到数据库中,拦截模式用个字段区分,1 电话拦截,2 短信拦截,3全部拦截 新建Activity类CallSmsSafeActivity.java 新建布局文件activity_ ...

最新文章

  1. 正确配置Linux系统ulimit值的方法
  2. java es 5.0.1_es.5.1.1启动失败
  3. 链接静态库的顺序问题
  4. Oracle 用shutdown+immediate关机后启动方法
  5. 编译bluez-utils-3.36,死活找不到bluez D-bus的解决方法
  6. LOJ.2865.[IOI2018]狼人(Kruskal重构树 主席树)
  7. 系统中已安装了vmware,请先卸载干净并重启电脑
  8. 整合 centos安装python的介绍
  9. cube station下载_Cube Station
  10. Vista忘记密码如何登录?
  11. php float转int 元转分
  12. 常见的五种前端页面布局(table布局、float布局、absolute布局、flex布局、grid布局)
  13. 人民币对美元汇率中间价报6.7969元 下调115个基点
  14. Makfile: [ GCC编译选项 ] >CFLAGS参数 -c -o
  15. ubuntu浏览器firefox无法播放视频
  16. macw资讯:MacOS如何隐藏、加密文件或文件夹
  17. c++读取MP3文件专辑图片、歌手名等ID3v2信息
  18. 松果出行 x StarRocks:实时数仓新范式的实践之路
  19. 如何让电脑运行速度变快
  20. mac按键难回弹(按下去软软的)

热门文章

  1. 远古VOD存在严重注入漏洞!!
  2. www.beihua.edu.cn计划摘录
  3. 在jsp中使用smartupload组件上传文件- -
  4. 模式匹配算法----KMP算法以及next数组的解法
  5. JSP实例-定时刷新页面
  6. matlab中response函数,matlab函数的种类
  7. concat合并的数组会有顺序么_javascript concat 数组与数组或数组与字符串的合并
  8. MongoDB简介、在node中使用MongoDB
  9. java .net 互通redis_C# servicestack.redis 互通 java jedis
  10. springcloud服务网关Netflix Zuul入门简介