Detailed Android Mobile Guard Setup Wizard Page
- 2021-06-29 12:01:31
- OfStack
Recommended reading:
Brief Analysis on Properties of Android Mobile Guard Custom Control
Brief Analysis of Android Mobile Security Off Automatic Update
Set up a wizard page, use SharedPreferences to determine if it's already set up, skip to a different page
custom style
In res/values/styles.xml
Add Node
<
style name=""
>
, set the name property
stay
<
style
>
Inside a node, add a node
<
item name=""
>
Setting the name property is the various parameters of the layout
stay
<
item
>
Inside the text, set various parameter values for the layout
Referencing styles in layout files, style="@style/xxxxxxxxxxxx"
Place small icons to the left of TextView
Use the left Icon property android:drawableLeft="@android:drawable/xxxxxxxxxxx" to reference the icon of the android system, for example: @android:drawable/star_big_on
Icons are vertically centered, using the alignment attribute android:gravity="center_vertical"
Small dot under guide page
Linear Layout, Horizontal, ImageView, Package Content, Centered Overall
Use system icon @android:drawable/presence_online
@android:drawable/presence_invisible
Customize Button Status Background
Define, add nodes in the res/drawable/button.xml file
<
selector
>
Define Button Press State Add
<
item
>
Node, set state property android:state_pressed="true"
Set picture property 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 property android:drawable="xxxx"
Set picture property 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 Setup 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 phone theft prevention includes the following functions: "
android:textSize="16sp" />
<TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="SIM Card Change Alarm " />
<TextView
style="@style/guide_text_list"
android:drawableLeft="@android:drawable/btn_star_big_on"
android:text="GPS Track " />
<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 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: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=" lower 1 step " />
</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>