刚刚花了一点时间,将导航界面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
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="防盗保护已关闭"
/> <!-- 让内部点的空间水平居中 -->
<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_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:layout_height="match_parent"> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/phone" />
<!-- 图片选择器,在选中和未选中的过程中,切换展示图片 -->
<Button style="@style/preBtn" />
<Button style="@style/nextBtn"
android:text="设置完成"
/> </RelativeLayout> </LinearLayout>

Android 手机卫士--导航界面3、4和功能列表界面跳转逻辑处理的更多相关文章

  1. Android 手机卫士--导航界面1的布局编写

    本文地址:http://www.cnblogs.com/wuyudong/p/5943005.html,转载请注明出处. 本文实现导航界面1的布局的实现,效果如下图所示: 首先分析所使用的布局样式: ...

  2. Android 手机卫士--导航界面2

    本文地址:http://www.cnblogs.com/wuyudong/p/5947504.html,转载请注明出处. 在之前的文章中,实现了导航界面1布局编写与相关的逻辑代码,如下图所示: 点击“ ...

  3. Android 手机卫士--导航界面4的业务逻辑

    本文实现导航界面4的业务逻辑,导航界面4的界面如下: 本文地址:http://www.cnblogs.com/wuyudong/p/5952640.html,转载请注明出处. 相应的代码如下: pri ...

  4. Android 手机卫士--参照文档编写选择器

    本文来实现<Android 手机卫士--导航界面1的布局编写>中的图片选择器部分的代码. 本文地址:http://www.cnblogs.com/wuyudong/p/5944356.ht ...

  5. Android 手机卫士--设置界面&功能列表界面跳转逻辑处理

    在<Android 手机卫士--md5加密过程>中已经实现了加密类,这里接着实现手机防盗功能 本文地址:http://www.cnblogs.com/wuyudong/p/5941959. ...

  6. Android 手机卫士--确认密码对话框编写

    本文接着实现“确认密码”功能,也即是用户以前设置过密码,现在只需要输入确认密码 本文地址:http://www.cnblogs.com/wuyudong/p/5940718.html,转载请注明出处. ...

  7. Android 手机卫士--签名文件说明&包名说明

    在<Android 手机卫士--打包生成apk维护到服务器>一文中,实现了新版本的apk到服务器,当打开客户端apk的时候,发现有新版本,提示更新.还实现了利用xutils工具实现了从服务 ...

  8. Android 手机卫士--弹出对话框

    在<Android 手机卫士--解析json与消息机制发送不同类型消息>一文中,消息机制发送不同类型的信息还没有完全实现,在出现异常的时候,应该弹出吐司提示异常,代码如下: private ...

  9. android手机卫士、3D指南针、动画精选、仿bilibli客户端、身份证银行卡识别等源码

    Android精选源码 android身份证.银行卡号扫描源码 android仿bilibili客户端 android一款3D 指南针 源码 android手机卫士app源码 android提醒应用, ...

随机推荐

  1. 冗余代码都走开——前端模块打包利器 Rollup.js 入门

    之前翻译过一篇文章,介绍了通过 ES2015 的解构赋值语法引入模块,可以让打包工具(browserify)最终编译出来的代码量最小化. 殊不知在 webpack 1.X 版本是无法利用该特性来避免引 ...

  2. .NET 基础一步步一幕幕[out、ref、params]

    out.ref.params out: 如果你在一个方法中,返回多个相同类型的值的时候,可以考虑返回一个数组. 但是,如果返回多个不同类型的值的时候,返回数组就不行了,那么这个时候, 我们可以考虑使用 ...

  3. C#设计模式-中介者模式

    在现实生活中,有很多中介者模式的身影,例如QQ游戏平台,聊天室.QQ群和短信平台,这些都是中介者模式在现实生活中的应用,下面就具体分享下我对中介者模式的理解. 一. 中介者(Mediator)模式 从 ...

  4. ★Kali信息收集~★7.FPing :ip段扫描

    参数: 使用方法: fping [选项] [目标...] -a显示是活着的目标 -A 显示目标地址 -b n 大量 ping 数据要发送,以字节为单位 (默认 56) -B f 将指数退避算法因子设置 ...

  5. Logstash时区、时间转换,message重组

    适用场景 获取日志本身时间 日志时间转Unix时间 重组message 示例日志: hellow@,@world@,@2011-11-01 18:46:43 logstash 配置文件: input{ ...

  6. Java学习之LinkedHashMap学习总结

    前言: 在学习LRU算法的时候,看到LruCache源码实现是基于LinkedHashMap,今天学习一下LinkedHashMap的好处以及如何实现lru缓存机制的. 需求背景: LRU这个算法就是 ...

  7. 理解 Neutron FWaaS - 每天5分钟玩转 OpenStack(117)

    前面我们学习了安全组,今天学习另一个与安全相关的服务 -- FWaaS.理解概念 Firewall as a Service(FWaaS)是 Neutron 的一个高级服务.用户可以用它来创建和管理防 ...

  8. JavaScript学习总结(一)——延迟对象、跨域、模板引擎、弹出层、AJAX示例

    一.AJAX示例 AJAX全称为“Asynchronous JavaScript And XML”(异步JavaScript和XML) 是指一种创建交互式网页应用的开发技术.改善用户体验,实现无刷新效 ...

  9. 读书笔记--SQL必知必会05--高级数据过滤

    5.1 组合使用WHERE子句 操作符(operator)也称为逻辑操作符(logical operator),用来联结或改变WHERE子句中的过滤条件. 5.1.1 AND操作符 在WHERE子句中 ...

  10. ASP.NET MVC Controller的激活

    最近抽空看了一下ASP.NET MVC的部分源码,顺带写篇文章做个笔记以便日后查看. 在UrlRoutingModule模块中,将请求处理程序映射到了MvcHandler中,因此,说起Controll ...