[android] 手机卫士设置向导页面

[android] 手机卫士设置向导页面,第1张

概述设置向导页面,通过SharedPreferences来判断是否已经设置过了,跳转到不同的页面 自定义样式 在res/values/styles.xml中 添加节点<style name=””&g

设置向导页面,通过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    androID:orIEntation="vertical" >    TextVIEw        androID:layout_wIDth        androID:layout_height="40dp"        androID:background="#2D89EF"        androID:gravity="center"        androID:text="1.手机防盗设置向导"        androID:textcolor="#fff"        androID:textSize="18sp" />    ="wrap_content"        androID:layout_marginleft="10dp"        androID:layout_margintop="8dp"="手机防盗包含以下功能:"="16sp" style="@style/guIDe_text_List"        androID:drawableleft="@androID:drawable/btn_star_big_on"="SIM卡变更报警" ="GPS追踪" ="远程数据销毁" ="远程锁屏" linearLayout        ="center_horizontal"        androID:orIEntation="horizontal" >        ImageVIEw                        androID:layout_height            androID:src="@androID:drawable/presence_online" />        ="@androID:drawable/presence_invisible" />    </linearLayoutrelativeLayout        ="match_parent" button            androID:textcolor="#444"            androID:layout_wIDth            androID:layout_alignParentBottom="true"            androID:layout_alignParentRight            androID:layout_marginBottom            androID:layout_marginRight            androID:background="@drawable/button_selector"            androID:text="下一步" relativeLayout>>

 

button_selector.xml

selector ="http://schemas.androID.com/apk/res/androID"item androID:drawable="@drawable/barcode_btn_guIDe_pressed" androID:state_focused="true"></item>     androID:state_pressed="@drawable/barcode_btn_guIDe_normal"selector>

 

总结

以上是内存溢出为你收集整理的[android] 手机卫士设置向导页面全部内容,希望文章能够帮你解决[android] 手机卫士设置向导页面所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1121136.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存