[Android] mobile guard setting Wizard Page, android wizard
Set the Wizard Page, and use SharedPreferences to determine whether the settings have been set, jump to different pages
Custom Style
In res/values/styles. xml
Add a node <style name = ""> and set the name attribute.
In the <style> node, add the node <item name = ""> set the name attribute, which is the layout parameters.
In the <item> text, set the layout parameters.
Reference the style in the layout file, style = "@ style/xxxxxxxxxxxx"
Place a small icon on the left of TextView
Use the icon attribute android: drawableLeft = "@ android: drawable/XXXXXXXXX" on the left to reference the icon of the android system, for example, @ android: drawable/star_big_on.
Vertical center alignment of icons. Use the alignment attribute android: gravity = "center_vertical"
Small dots under the boot page
Linear layout, horizontal layout, ImageView, package content, and overall Center
Use the System icon @ android: drawable/presence_online
@ Android: drawable/presence_invisible
Custom button status background
In the res/drawable/button. xml file, add a node <selector>
Click the define button to add the <item> node to the status, and set the status attribute android: state_pressed = "true"
Set image properties android: drawable = "xxxx"
Set the button focus status to add a <item> node and set the status attribute android: state_focus = "true"
Define the button to add the <item> node to the default image, and set the image attribute android: drawable = "xxxx"
Set image properties android: drawable = "xxxx"
In the layout file, set the background for the button, 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. mobile anti-theft setting wizard "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 = "mobile anti-theft includes the following features:" android: textSize = "16sp"/> <TextView style = "@ style/guide_text_list" android: drawableLeft = "@ android: drawable/btn_star_big_on" android: text = "SIM card change alert"/> <TextView style = "@ style/guide_text_list" android: drawableLeft = "@ android: drawable/btn_star_big_on" android: text = "GPS tracking"/> <TextView style = "@ style/guide_text_list" android: drawableLeft = "@ android: drawable/btn_star_big_on" android: text = "remote data destruction"/> <TextView style = "@ style/guide_text_list" android: drawableLeft = "@ android: drawable/btn_star_big_on" android: text = "remote screen lock"/> <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 = "Next"/> </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>