• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >Android > Android 手机卫士--导航界面3、4和功能列表界面跳转逻辑处理,android4和

Android 手机卫士--导航界面3、4和功能列表界面跳转逻辑处理,android4和

作者:网友 字体:[增加 减小] 来源:互联网 时间:2017-05-26

网友通过本文主要向大家介绍了Android 手机卫士--导航界面3、4和功能列表界面跳转逻辑处理,android4和等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com

Android 手机卫士--导航界面3、4和功能列表界面跳转逻辑处理,android4和


刚刚花了一点时间,将导航界面3、4的布局和相应的跳转逻辑写了一下:

Setup3Activity代码如下:

/**
 * 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();
    }
}

对应的布局文件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.设置安全号码" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#000"
        android:textSize="18sp"
        android:layout_margin="5dp"
        android:text="sim卡变更后\n就会发送报警短信安全号码" />
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/et_phone_number"
        android:hint="请输入电话号码"
        />
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/bt_select_number"
        android:text="选择联系人"
        android:background="@drawable/selector_number_btn"
        />

    <!-- 让内部点的空间水平居中 -->
    <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:layout_height="match_parent">

        <!-- 图片选择器,在选中和未选中的过程中,切换展示图片 -->
        <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>

Setup4Activity代码如下:

/**
 * 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();
    }
}

对应的布局文件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.恭喜您,设置完成" />

    <CheckBox
        


 
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • Android 手机卫士--导航界面3、4和功能列表界面跳转逻辑处理,android4和

相关文章

  • 2017-05-26AsyncTask源码探究,asynctask源码
  • 2017-05-26想要了解Kotlin,看这个就够了,想要Kotlin,
  • 2017-05-26ReactNative官方中文文档0.21,reactnative0.21
  • 2017-05-26Android实战技巧之五十一:libjpeg与Android
  • 2017-05-26客户端和服务端如何使用Token和Session,tokensession
  • 2017-05-26FragmentTabHost的基本用法,fragmenttabhost
  • 2017-05-227.5.2 WebView和JavaScrip交互基础
  • 2017-05-26[better practice系列]Android处理好activity正确情况下的生命周期和意外情况下的生命周期浅析
  • 2017-05-26解决Android Graphical Layout 界面效果不显示,androidgraphical
  • 2017-05-26仿微信底部TAG完美渐变,tag渐变

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 设计模式学习心得,设计模式
    • Android Facebook和Twitter分享
    • AS下NDK开发(一),as下ndk开发
    • Android开发艺术探索学习笔记(十一),android艺术探索
    • android 实现漫天飞舞雪花以及下雨天的效果
    • Android APK免安装启动
    • Android 手机卫士--绑定sim卡序列号,androidsim
    • Android ListView onItemClick Not Work,androidonitemclick
    • Android之使用文件进行IPC,android文件ipc
    • android 使用AsyncHttpClient框架上传文件以及使用HttpURLConnection下载文件

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有