Android 手机卫士--导航界面3、4和功能列表界面跳转逻辑处理
刚刚花了一点时间,将导航界面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和功能列表界面跳转逻辑处理的更多相关文章
- Android 手机卫士--导航界面1的布局编写
本文地址:http://www.cnblogs.com/wuyudong/p/5943005.html,转载请注明出处. 本文实现导航界面1的布局的实现,效果如下图所示: 首先分析所使用的布局样式: ...
- Android 手机卫士--导航界面2
本文地址:http://www.cnblogs.com/wuyudong/p/5947504.html,转载请注明出处. 在之前的文章中,实现了导航界面1布局编写与相关的逻辑代码,如下图所示: 点击“ ...
- Android 手机卫士--导航界面4的业务逻辑
本文实现导航界面4的业务逻辑,导航界面4的界面如下: 本文地址:http://www.cnblogs.com/wuyudong/p/5952640.html,转载请注明出处. 相应的代码如下: pri ...
- Android 手机卫士--参照文档编写选择器
本文来实现<Android 手机卫士--导航界面1的布局编写>中的图片选择器部分的代码. 本文地址:http://www.cnblogs.com/wuyudong/p/5944356.ht ...
- Android 手机卫士--设置界面&功能列表界面跳转逻辑处理
在<Android 手机卫士--md5加密过程>中已经实现了加密类,这里接着实现手机防盗功能 本文地址:http://www.cnblogs.com/wuyudong/p/5941959. ...
- Android 手机卫士--确认密码对话框编写
本文接着实现“确认密码”功能,也即是用户以前设置过密码,现在只需要输入确认密码 本文地址:http://www.cnblogs.com/wuyudong/p/5940718.html,转载请注明出处. ...
- Android 手机卫士--签名文件说明&包名说明
在<Android 手机卫士--打包生成apk维护到服务器>一文中,实现了新版本的apk到服务器,当打开客户端apk的时候,发现有新版本,提示更新.还实现了利用xutils工具实现了从服务 ...
- Android 手机卫士--弹出对话框
在<Android 手机卫士--解析json与消息机制发送不同类型消息>一文中,消息机制发送不同类型的信息还没有完全实现,在出现异常的时候,应该弹出吐司提示异常,代码如下: private ...
- android手机卫士、3D指南针、动画精选、仿bilibli客户端、身份证银行卡识别等源码
Android精选源码 android身份证.银行卡号扫描源码 android仿bilibili客户端 android一款3D 指南针 源码 android手机卫士app源码 android提醒应用, ...
随机推荐
- 白板编程浅谈——Why, What, How
作者:Lucida 微博:@peng_gong 豆瓣:@figure9 原文链接:http://lucida.me/blog/whiteboard-coding-demystified/ 这篇文章节选 ...
- LeetCode-1TwoSum(C#)
# 题目 1. Two Sum Given an array of integers, return indices of the two numbers such that they add up ...
- iOS 之消息推送(个推)---个人小结
前言:自从上个星期开始整这个推送,弄了差不多一个星期,今天终于给整好了,因此现在来记录这段"奇妙"的旅程. 我们公司使用的消息推送是用的第三方--个推,这里不得不说一下,个推的技术 ...
- springmvc 配置01
springmvc请求流程与struts比较 1.添加包 com.springsource.org.aopalliance-1.0.0.jarcom.springsource.org.apache ...
- javascript中字符串的比较规则
弄清这个还是很重要的,在字符排序中很有用处 非空字符串 > 空字符串 从第一个字符的charCode开始比较,大的就大 所有的字符都相同,就比较长度,长的大 '0'>'' '2'>' ...
- scheduleInRunLoop作用
例子一: - (void)setUpStreamForFile:(NSString *)path { // iStream is NSInputStream instance variable iSt ...
- 引用MVC源码的小问题
vs2010自己创建的MVC项目,排除掉System.Web.Mvc引用后,引用源码,直接运行会提示引用冲突,这个是因为配置文件的问题,只要把配置文件中assemblies节点下的 <add a ...
- 前端学HTTP之URL
× 目录 [1]URI [2]URL语法 [3]字符[4]编码方法 前面的话 一般地,URL和URI比较难以区分.接下来,本文以区分URL和URI为引子,详细介绍URL的用法 URI与URL的区别 U ...
- YYModel 源码解读(二)之NSObject+YYModel.h (5)
好了,之前的博文中详细的解释了一些辅助的类和辅助的函数,接下来就是使用它们来实现酷炫功能的时候,正所谓磨刀不误砍柴工啊 我们先把总的功能罗列出来 1. json转字典 + ( ...
- Cocoa深入学习:NSOperationQueue、NSRunLoop和线程安全 (转)
目前在 iOS 和 OS X 中有两套先进的同步 API 可供我们使用:NSOperation 和 GCD .其中 GCD 是基于 C 的底层的 API ,而 NSOperation 则是 GCD 实 ...