Android mobile guard-navigation interface 2, android guard

Source: Internet
Author: User

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:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.