This article address: http://www.cnblogs.com/wuyudong/p/5947504.html, reprint please indicate the source.
In the previous article, implemented the navigation interface 1 layout writing with the related logic code, as shown in:
Click "Next Page"
public class setup1activity extends activity{@Override protected< /span> void OnCreate (Bundle savedinstancestate { super .oncreate (Savedinstancestate) ; Setcontentview (R.LAYOUT.ACTIVITY_SETUP1); public void NextPage (view view) {Intent Intent = new Intent (Getapplicationcontex T (), setup2activity. class ); StartActivity (Intent); Finish (); }}
Enter a new activity:
As you can see, the layout is similar to the previous code, as follows:
<?XML version= "1.0" encoding= "Utf-8"?><LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"android:orientation= "vertical"> <TextViewstyle= "@style/titlestyle"Android:text= "2. Mobile Card binding" /> <TextViewAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:textcolor= "#000"android:textsize= "18SP"Android:layout_margin= "5DP"Android:text= "By binding SIM card: \ nthe next time you restart your phone if you notice a change in the SIM card will send an alarm message" /> <Com.wuyudong.mobilesafe.view.SettingItemViewXmlns:mobilesafe= "Http://schemas.android.com/apk/res/com.wuyudong.mobilesafe"Android:id= "@+id/siv_sim_bound"Android:layout_width= "Match_parent"Android:layout_height= "Wrap_content"Mobilesafe:destitle= "Click to bind SIM card"Mobilesafe:desoff= "SIM card not Bound"Mobilesafe:deson= "SIM card is bound" > </Com.wuyudong.mobilesafe.view.SettingItemView> <!--Center The interior point space horizontally - <LinearLayoutAndroid:layout_width= "Match_parent"Android:layout_height= "Wrap_content"android:gravity= "Center_horizontal"> <ImageViewAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:background= "@android:d rawable/presence_invisible" /> <ImageViewAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:background= "@android:d rawable/presence_online" /> <ImageViewAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:background= "@android:d rawable/presence_invisible" /> <ImageViewAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:background= "@android:d rawable/presence_invisible" /> </LinearLayout> <RelativelayoutAndroid:layout_width= "Match_parent"Android:layout_height= "Match_parent"> <ImageViewAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:layout_centerinparent= "true"Android:background= "@mipmap/bind" /> <!--picture selector, toggle display picture during check and unchecked - <Buttonstyle= "@style/prebtn" /> <Buttonstyle= "@style/nextbtn" /> </Relativelayout></LinearLayout>
The effect is as follows:
Android Phone defender--navigation interface 2