Android mobile guard-navigation interface 2, android guard
For more information, see http://www.cnblogs.com/wuyudong/p/5947504.html.
In the previous article, the layout of navigation interface 1 is implemented and related logic code is compiled, as shown in:
Click "Next page"
public class Setup1Activity extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_setup1); } public void nextPage(View view) { Intent intent = new Intent(getApplicationContext(), Setup2Activity.class); startActivity(intent); finish(); }}
Enter a new activity:
As you can see, the layout is similar to the previous one. The Code is as follows:
<? 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 style = "@ style/TitleStyle" android: text = "2. mobile phone card binding "/> <TextView android: layout_width =" wrap_content "android: layout_height =" wrap_content "android: textColor =" #000 "android: textSize =" 18sp "android: layout_margin = "5dp" Ndroid: text = "by binding a SIM card: \ n next time you restart your phone. If the SIM card changes, \ n will send an alert message"/> <com. wuyudong. mobilesafe. view. settingItemView xmlns: 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 already bound"> </com. wuyudong. mobilesafe. View. SettingItemView> <! -- Align the space of the internal vertex horizontally --> <LinearLayout android: layout_width = "match_parent" android: layout_height = "wrap_content" android: gravity = "center_horizontal"> <ImageView android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: background = "@ android: drawable/presence_invisible"/> <ImageView android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: background = "@ android: Drawable/presence_online "/> <ImageView android: layout_width =" wrap_content "android: layout_height =" wrap_content "android: background =" @ android: drawable/presence_invisible "/> <ImageView android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: background = "@ android: drawable/presence_invisible"/> </LinearLayout> <RelativeLayout android: layout_width = "match_parent" android: layou T_height = "match_parent"> <ImageView android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_centerInParent = "true" android: background = "@ mipmap/bind"/> <! -- Image selector, in the process of selecting and not selecting, switch between display pictures --> <Button style = "@ style/preBtn"/> <Button style = "@ style/nextBtn"/> </RelativeLayout> </LinearLayout>
The effect is as follows: