Recommended reading:
A brief analysis of Android phone defender custom control properties
An analysis of Android phone defender turn off automatic Updates
Set the wizard page to determine if it has been set and jump to a different page by sharedpreferences
Custom Style
In the Res/values/styles.xml
Add node <style name= "", Set Name property
In <style> node, add node <item name= "" > Set Name property, is the various parameters of the layout
In <item> text, set various parameter values for the layout
Referencing styles in layout files, style= "@style/xxxxxxxxxxxx"
Place a small icon on the left side of the TextView
Use the left Icon property android:drawableleft= "@android:d rawable/xxxxxxxxxxx" to refer to the Android icon, for example: @android:d rawable/star_big_on
Icons are centered vertically, using the Alignment property android:gravity= "Center_vertical"
Small dots below the boot page
Linear layout, transverse, imageview, wrapped content, centered overall
Use the System icon @android:d rawable/presence_online
@android:d rawable/presence_invisible
Custom button Status background
Define in Res/drawable/button.xml file, add nodes <selector>
Define button Press state add <item> node, set state property android:state_pressed= "true"
Set picture Properties android:drawable= "xxxx"
Set button focus State add <item> node, set state property android:state_focus= "true"
Define button default picture Add <item> node, set picture Properties android:drawable= "xxxx"
Set picture 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 Settings Wizard" android:textcolor= "#fff" android:textsize= "18sp"/> < TextView android:layout_width= "wrap_content" android:layout_height= "Wrap_content" 10DP "Android:layout_margintop=" 8DP "android:text=" mobile anti-theft contains the following functions: "android:textsize=" 16sp "/> <textview style=" @style /guide_text_list "android:drawableleft=" @android:d rawable/btn_star_big_on "android:text=" SIM card change Alarm "/> < TextView style= "@style/guide_text_list" android:drawableleft= "@android:d rawable/btn_star_big_on" android:text= " GPS tracking "/> <textview style=" @style/guide_text_list "android:drawableleft=" @android:d Rawable/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 lock Screen"/> <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:d rawable
/presence_online "/> <imageview android:layout_width= wrap_content" android:layout_height= "Wrap_content" android:src= "@android:d rawable/presence_invisible"/> <imageview android:layout_width= "Wrap_content" Android : layout_height= "wrap_content" android:src= "@android:d rawable/presence_invisible"/> <imageview android: Layout_width= "Wrap_content" android:layout_height= "wrap_content" android:src= "@android:d Rawable/presence_ Invisible "/> </LinearLayout> <relativelayout android:layout_width=" match_parent "Android:layout_heigh"t= "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>