[android] 手机卫士设置向导页面
设置向导页面,通过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" > <TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="#2D89EF"
android:gravity="center"
android:text="1.手机防盗设置向导"
android:textColor="#fff"
android:textSize="18sp" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="8dp"
android:text="手机防盗包含以下功能:"
android:textSize="16sp" /> <TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="SIM卡变更报警" /> <TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="GPS追踪" /> <TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="远程数据销毁" /> <TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="远程锁屏" /> <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal" > <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_online" /> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_invisible" /> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_invisible" /> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_invisible" />
</LinearLayout> <RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" > <Button
android: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>
[android] 手机卫士设置向导页面的更多相关文章
- Android 手机卫士2--home页面
1,自定义获取焦点的TextView FocusTextView.java package com.itheima.mobilesafe74.view; import android.content. ...
- Android 手机卫士--设置界面&功能列表界面跳转逻辑处理
在<Android 手机卫士--md5加密过程>中已经实现了加密类,这里接着实现手机防盗功能 本文地址:http://www.cnblogs.com/wuyudong/p/5941959. ...
- Android 手机卫士--参照文档编写选择器
本文来实现<Android 手机卫士--导航界面1的布局编写>中的图片选择器部分的代码. 本文地址:http://www.cnblogs.com/wuyudong/p/5944356.ht ...
- Android 手机卫士--确认密码对话框编写
本文接着实现“确认密码”功能,也即是用户以前设置过密码,现在只需要输入确认密码 本文地址:http://www.cnblogs.com/wuyudong/p/5940718.html,转载请注明出处. ...
- Android 手机卫士--签名文件说明&包名说明
在<Android 手机卫士--打包生成apk维护到服务器>一文中,实现了新版本的apk到服务器,当打开客户端apk的时候,发现有新版本,提示更新.还实现了利用xutils工具实现了从服务 ...
- Android 手机卫士--弹出对话框
在<Android 手机卫士--解析json与消息机制发送不同类型消息>一文中,消息机制发送不同类型的信息还没有完全实现,在出现异常的时候,应该弹出吐司提示异常,代码如下: private ...
- android手机卫士、3D指南针、动画精选、仿bilibli客户端、身份证银行卡识别等源码
Android精选源码 android身份证.银行卡号扫描源码 android仿bilibili客户端 android一款3D 指南针 源码 android手机卫士app源码 android提醒应用, ...
- Android 手机卫士--阶段小结1
本文地址:http://www.cnblogs.com/wuyudong/p/5904528.html,转载请注明源地址. 本文对之前手机卫士开发进行一个小结. 1.SplashActivity 版本 ...
- Android 手机卫士--安装过程中点击回退按钮
本文地址:http://www.cnblogs.com/wuyudong/p/5903707.html,转载请注明源地址. 在手机卫士之前的版本升级的对话框中: 有的用户暂时不想更新,没有点击“稍后再 ...
随机推荐
- java中JTextPane使输出字符到指定的宽度换行,并将垂直滚动条的位置移动到输出的最后位置
SimpleAttributeSet set = new SimpleAttributeSet(); Document doc = tp.getStyledDocument(); FontMetric ...
- Java -- 根据当前日期获取当前一周的所有日期
Learn From:http://my.oschina.net/hermer/blog/151274 /** * 测试 * @param args */ public static void mai ...
- 浅析LRU(K-V)缓存
LRU(Least Recently Used)算法是缓存技术中的一种常见思想,顾名思义,最近最少使用,也就是说有两个维度来衡量,一个是时间(最近),一个频率(最少).如果需要按优先级来对缓存中的K- ...
- Android学习笔记之图片轮播...
PS:一个bug又折腾了一个下午....哎... 学习内容: 1.Android利用ViewPager和PagerAdapter实现图片轮播... 2.使用反射机制获取Android的资源信息... ...
- undefined reference to `omp_get_max_threads'
原因是缺少 libgomp/openmp 库的链接 配置和解决方法参考: http://www.code-by.org/viewtopic.php?f=54&t=163
- Hyperion Business Modeling for Microsoft Windows (32-bit)
介质包搜索 常见问题 说明 复查 许可证列表 以确定需要下载的产品程序包. 请选择产品程序包和平台,然后单击“查找”. 如果只有一项结果,则可以看到下载页.如果有多个结果,请选择一个,然后单 ...
- Javascript语法去控制Web控件的Enabled属性
Web控件当使用Enabled属性时,它生成html之后会变成了disabled了.我们为了能够在javascript去控制控件的禁用与启用,得从这个disabled入手.如:
- 【.NET框架】Dapper ORM 用法—Net下无敌的ORM
假如你喜欢原生的Sql语句,又喜欢ORM的简单,那你一定会喜欢上Dapper这款ROM.点击下载 Dapper的优势: 1,Dapper是一个轻型的ORM类.代码就一个SqlMapper.cs文件,编 ...
- Gridview的RowDataBound事件(添加删除提示,改变背景颜色)
protected void gvTest_RowDataBound(object sender, GridViewRowEventArgs e) { //如果是绑定数据行 if (e.Row.Row ...
- C#中dategridview数据导出为excel文件
先从数据库中获取数据,绑定在datagridview中,再从dategridview中导出为excel文件 1.新建窗体,把控件datagridview和按钮设置好,如图