Android mobile guard-navigation interface 3, 4 and function list interface jump logic processing, android4 and

Source: Internet
Author: User

Android mobile guard-navigation interface 3, 4 and function list interface jump logic processing, android4 and

It took just a moment to write the layout of the navigation interface 3 and 4 and the corresponding jump logic:

The Setup3Activity code is as follows:

/** * Created by wuyudong on 2016/10/10. */public class Setup3Activity extends Activity{    @Override    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.activity_setup3);    }    public void nextPage(View view) {        Intent intent = new Intent(getApplicationContext(), Setup4Activity.class);        startActivity(intent);        finish();    }    public void prePage(View view) {        Intent intent = new Intent(getApplicationContext(), Setup2Activity.class);        startActivity(intent);        finish();    }}

The layout file activity_setup3.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 style = "@ style/TitleStyle" android: text = "3. set the Security number "/> <TextView android: layout_width =" wrap_content "android: layout_height =" wrap_content "android: textColor =" #000 "android: textSize =" 18sp "android: layout_margin = "5dp" Android: text = "after the SIM card is changed, \ n will send an alert SMS security number"/> <EditText android: layout_width = "match_parent" android: layout_height = "wrap_content" android: id = "@ + id/et_phone_number" android: hint = "Enter the phone number"/> <Button android: layout_width = "match_parent" android: layout_height = "wrap_content" android: id = "@ + id/bt_select_number" android: text = "select contact" android: background = "@ drawable/selector_number_btn"/> <! -- 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_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"/> </LinearLayout> <RelativeLayout android: layout_width = "match_parent" android: layou T_height = "match_parent"> <! -- Image selector, in the process of selecting and not selecting, switch between display pictures --> <Button style = "@ style/preBtn"/> <Button style = "@ style/nextBtn"/> <ImageView android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: background = "@ drawable/phone" android: layout_centerVertical = "true" android: layout_centerHorizontal = "true"/> </RelativeLayout> </LinearLayout>

The Setup4Activity code is as follows:

/** * Created by wuyudong on 2016/10/10. */public class Setup4Activity extends Activity{    @Override    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.activity_setup4);    }   public void nextPage(View view) {        Intent intent = new Intent(getApplicationContext(), SetupOverActivity.class);        startActivity(intent);        finish();        SpUtil.putBoolean(this, ConstantValue.SETUP_OVER, true);    }    public void prePage(View view) {        Intent intent = new Intent(getApplicationContext(), Setup3Activity.class);        startActivity(intent);        finish();    }}

The layout file activity_setup4.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 style = "@ style/TitleStyle" android: text = "4. congratulations! The setting is complete. "/> <CheckBox android: layout_width =" wrap_content "android: layout_height =" wrap_content "android: text =" anti-theft protection disabled "/> <! -- 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/hide "/> <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"/> </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 = "@ drawable/phone"/> <! -- Image selector, in the process of selecting and not selecting, switch between display pictures --> <Button style = "@ style/preBtn"/> <Button style = "@ style/nextBtn" android: text = "completed"/> </RelativeLayout> </LinearLayout>

 

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.