注意:课程设计只为完成任务,不做细节描述~

package com.example.myapplication;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.TextView; /**
* Created by 樱花落舞 on 2017/6/13.
*/ public class JumpActivity extends Activity {
TextView textView;
int time=3;
Handler handler=new Handler();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.jump);
textView= (TextView) findViewById(R.id.textview); handler.postDelayed(runnable,1000); } Runnable runnable=new Runnable() {
@Override
public void run() {
time--;
handler.postDelayed(this,1000);
textView.setText("+"+time+"s"); if(time==0){
Intent intent = new Intent(JumpActivity.this,TestActivity.class);
startActivity(intent);
finish();
}else {
textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(JumpActivity.this,TestActivity.class);
startActivity(intent);
//结束线程
handler.removeCallbacks(runnable);
finish();
}
});
}
}
};
}
package com.example.myapplication;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
intent.setClass(MainActivity.this,JumpActivity.class);
startActivity(intent);
MainActivity.this.finish();
}
Intent intent = new Intent();
}
package com.example.myapplication;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable; /**
* Created by 樱花落舞 on 2017/6/13.
*/ public class TestActivity extends Activity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.empty_activity);
}
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.myapplication.MainActivity" android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/bg"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="+3秒"
android:id="@+id/text"
android:textSize="20dp"
android:layout_alignParentRight="true"/> </RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/a"/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/bg"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textview"
android:textSize="20sp"
android:text="+3s"
android:layout_alignParentRight="true"/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapplication"> <application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".JumpActivity"
android:label="@string/app_name"
>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity"/>
</activity>
<activity android:name=".TestActivity"
android:label="@string/app_name">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity"/> </activity>
</application> </manifest>

Android课程设计第六天欢迎界面(跳转)的更多相关文章

  1. Android课程设计第二天界面排版

    注意:课程设计只为完成任务,不做细节描述~ 老师叫我们做一个这个样子,然后.. <?xml version="1.0" encoding="utf-8"? ...

  2. Android课程设计第五天欢迎界面(滑动)和图形选择

    注意:课程设计只为完成任务,不做细节描述~ 滑动界面 package com.example.myapplication; import android.content.Intent; import ...

  3. Android课程设计——博学谷1.0

    本文讲述了如何应用大三下学期智能移动终端开发技术课程所学知识,完成包含服务器端.客户端程序的应用——博学谷登录模块的开发,结合java语言基本知识,例如:字符串.列表.类.数据库读写等,设计.实现一个 ...

  4. java(课程设计之记事本界面部分代码公布)

    代码:涉及记事本的一些界面......!! /* *java课程设计之记事本(coder @Gxjun) * 编写一个记事本程序 * 要求: * 用图形用户界面实现. * 能实现编辑.保存.另存为.查 ...

  5. Android课程设计第四天ListView运用

    注意:课程设计只为完成任务,不做细节描述~ 效果图 <?xml version="1.0" encoding="utf-8"?> <Relat ...

  6. Android课程设计第三天帧动画区间动画

    注意:课程设计只为完成任务,不做细节描述~ 点火是帧动画,发射是区间动画,于是 <?xml version="1.0" encoding="utf-8"? ...

  7. Android课程设计第一天Android Studio安装

    注意:课程设计只为完成任务,不做细节描述~ 学校有一个Android的课设,所以顺便把Android Studio安装了上去. 实际上安装过程并不复杂,只有几个地方需要注意~ 安装包可以去http:/ ...

  8. java课程设计--WeTalk(201521123072秦贞一)

    在线群聊系统 1,团队课程设计博客链接 http://www.cnblogs.com/slickghost/p/7018105.html 个人负责模块或任务说明 负责模块:界面设计与实现 2,自己的代 ...

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

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

随机推荐

  1. Spring源码深度解析——笔记

    1.spring容器的基本用法 xml配置 <bean id="myTestBean" class="bean.MyTestBean"/> 调用 B ...

  2. 初识Restful(学习笔记)

    什么是Restful? REST -- Resource Representational State Transfer(表现层状态转移) 本质上是一种优雅的URL表达方式,描述资源的状态和状态的转移 ...

  3. Java虚拟机平台无关性

    jruby Java 虚拟机面试题全面解析(干货) - Yano_nankai的博客 - CSDN博客 http://m.blog.csdn.net/Yano_nankai/article/detai ...

  4. SWT 安装

    下载地址: http://www.eclipse.org/windowbuilder/download.php 看到页面如下:选择图片标记的 3.7 (Indigo)  update site lin ...

  5. (linux)tasklet

      tasklet Tasklet的使用比较简单,只需要定义tasklet及其处理函数并将两者关联 例子: Void my_tasklet_func(unsigned long) DECLARE_TA ...

  6. dns服务器报错解决

    搭了个dns服务器,配置完毕老是报错,这里总结一下常见思路: ①关闭firewalld ②关闭selinux ③/var/named里面的配置文件所属用户组是否是root:named ④named.c ...

  7. 获取cookies的简单代码(总结待续)

    Cookie[] cookies = request.getCookies(); Cookie cookie = null; for (int i = 0; i < cookies.length ...

  8. Silverlight中使用MVVM(4)

    Silverlight中使用MVVM(1)--基础 Silverlight中使用MVVM(2)—提高 Silverlight中使用MVVM(3)—进阶 Silverlight中使用MVVM(4)—演练 ...

  9. iOS 观察者模式(KVO)的简单使用

    KVO的全称是Key-Value Observing,它实现了一种机制,对所关心的属性对象添加观察者,当属性值发生变化时会得到通知,我们可以对变化做相应的处理.看过设计模式的同学应该知道,这是一种典型 ...

  10. SpringMVC之使用Validator接口进行验证

    对于任何一个应用而言在客户端做的数据有效性验证都不是安全有效的,这时候就要求我们在开发的时候在服务端也对数据的有效性进行验证.SpringMVC自身对数据在服务端的校验有一个比较好的支持,它能将我们提 ...