package com.test;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
public class Activity1 extends Activity {
private String TAG="activity1";
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity1);
Button btn1 = (Button)findViewById(R.id.button1);
btn1.setOnClickListener(new Button.OnClickListener(){
public void onClick(View v){
Intent intent = new Intent();
intent.setClass(Activity1.this,Activity2.class);
startActivity(intent);
Activity1.this.finish();
}
});
Log.v(TAG, "onCreate");
}
public void onStart(){
super.onStart();
Log.v(TAG, "onStart");
}
public void onPause(){
super.onPause();
Log.v(TAG, "onPause");
}
public void onResume(){
super.onResume();
Log.v(TAG, "onResume");
}
public void onStop(){
super.onStop();
Log.v(TAG, "onStop");
}
public void onRestart(){
super.onRestart();
Log.v(TAG, "onRestart");
}
public void onDestroy(){
super.onDestroy();
Log.v(TAG, "onDestroy");
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
android Intent例子源码
共27个文件
class:10个
xml:5个
png:3个
需积分: 9 59 下载量 169 浏览量
2010-09-27
10:52:26
上传
评论 1
收藏 44KB RAR 举报
温馨提示
android Intent例子源码android Intent例子源码android Intent例子源码android Intent例子源码android Intent例子源码android Intent例子源码
资源推荐
资源详情
资源评论
收起资源包目录
Intent.rar (27个子文件)
Intent
.project 842B
default.properties 449B
bin
com
test
R$string.class 453B
R$layout.class 402B
R$drawable.class 428B
Activity1$1.class 1021B
Activity1.class 2KB
R.class 461B
Activity2.class 2KB
Activity2$1.class 1021B
R$attr.class 310B
R$id.class 444B
resources.ap_ 12KB
Intent.apk 16KB
classes.dex 5KB
AndroidManifest.xml 744B
src
com
test
Activity1.java 1KB
Activity2.java 1KB
res
values
color.xml 161B
strings.xml 264B
layout
activity2.xml 798B
activity1.xml 755B
drawable-ldpi
icon.png 2KB
drawable-hdpi
icon.png 4KB
drawable-mdpi
icon.png 3KB
.classpath 280B
gen
com
test
R.java 1KB
assets
共 27 条
- 1
资源评论
guxj821
- 粉丝: 11
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功