package com.hanqi.text3;

import android.app.Activity;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.util.Log; /**
* Created by Administrator on 2016/3/16.
*/
//回调方法
public class Activity2 extends Activity { @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //
setContentView(R.layout.activity2); System.out.println("这是我运行的第一个Activity"); Log.e("TAG","######创建"); }
@Override
protected void onStart(){
super.onStart(); Log.e("ATG","######启动"); }
@Override
protected void onResume(){
super.onResume();
Log.e("ATG", "######显示");
} @Override
protected void onPause(){
super.onPause();
Log.e("ATG", "######暂停");
}
@Override
protected void onStop(){
super.onStop();
Log.e("ATG", "######停止");
}
@Override
protected void onRestart(){
super.onRestart();
Log.e("ATG", "######重新启动");
}
@Override
protected void onDestroy(){
super.onDestroy();
Log.e("ATG", "######销毁");
}
}

Activity2.java的更多相关文章

  1. Android 资源(resource详解(转)

    本文介绍在Android开发中关于资源文件的存储操作.对于Android资源也是非常重要的,主要包括文本字符串(strings).颜色(colors).数组(arrays).动画(anim).布局(l ...

  2. Android课程---Activity 带返回值的跳转

    Activity2.java package com.hanqi.test4; import android.content.Intent; import android.os.Bundle; imp ...

  3. Android,使用Intent或Bundle传递参数,跳转页面。

    (1)使用Intent跳转页面: 第一个activity:MainActivity.java中: Intent myIntent = new Intent(); myIntent.putExtra(& ...

  4. Android_Intent_startActivityForResult

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&q ...

  5. Android_Intent_passValue(4)

    xml布局文件: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns ...

  6. Intent传值之通过Application传值

    传值第五种方式: * 程序的全局变量application * 特点:1.一个程序application对象只能有一个 * 2.application对象在程序启动时就创建 * 3.通常用来存放全局变 ...

  7. Android 利用Application对象存取公共数据

    本文章来给大家介绍Android 利用Application对象存取公共数据. Android系统在运行每一个程序应用的时候,都会创建一个Application对象,用于存储与整个应用相关的公共变量. ...

  8. Android应用开发基础篇(2)-----Notification(状态栏通知)

    一.概述      Notification这个部件的功能是在状态栏里显示消息提醒,比如有未读的短信或者是未接的电话,那么状态栏里都会有显示,更或者是从某个应用(比如QQ,酷我音乐等等)里按Home键 ...

  9. Android intent 笔记

    学习android的intent,将其中的一些总结,整理的笔记记录于此. intent是一个消息传递对象,可以在不同组件间传递数据.Activity,Service,Broadcast Receive ...

随机推荐

  1. (转)C#如何加载程序运行目录外的程序集

    https://www.cnblogs.com/guanglin/p/3200989.html 我们的应用程序部署的时候,目录结构一般不会只有运行程序的目录这一个,我们可能在运行目录下建子目录,也可能 ...

  2. 关于CSS中的浮动

    在页面布局中我们经常会用到浮动的布局,浮动元素会影响到后面页面的布局效果.例如下面: .box{ background: yellow; float: left; } .box2{ width: 20 ...

  3. linux c 编程相关资料

    1. linux下的错误定义及其错误捕获:http://blog.csdn.net/tigerjibo/article/details/6819891 2. 在线 c 系统调用手册 http://c. ...

  4. Redis服务器开启远程访问

    重启  ps aux|grep redis root 32684 0.0 0.0 48452 6944 ? Ssl 21:27 0:00 ./redis-server *:6379 kill了这个进程 ...

  5. 2017面向对象程序设计(JAVA)第3周学习指导及要求(2017.9.6-2017.9.12)

    学习目标 掌握类与对象的基础概念,理解类与对象的关系: 掌握对象与对象变量的关系: 掌握预定义类的基本使用方法,熟悉Math类.String类.math类.Scanner类.LocalDate类的常用 ...

  6. U3D框架—单例框架

    写程序应遵循的原则:高内聚(内容的聚合),低耦合(功能与功能之间的联系) 代码里尽量不要有冗余:既重复,没有用的代码 using System.Collections; using System.Co ...

  7. js 判断整数

    参考 https://blog.csdn.net/tangxiujiang/article/details/78073792 1.使用取余运算符(%) + 判断对象是否是数字来判断: 注意:空字符串. ...

  8. jpa orderby

    return criteriaQuery.where(in).orderBy(new OrderImpl(root.get("field1"))).getRestriction() ...

  9. char和varchar查询速度、存储空间比较详解(转)

    转:http://tech.diannaodian.com/dw/data/sql/2011/1005/135572.html 一.数据行结构 1.char(n): 系统分配n个字节给此字段,不管字段 ...

  10. openstack(Pike 版)集群部署(二)--- Keystone 部署

    一.介绍 参照官网部署:https://docs.openstack.org/keystone/queens/install/ 继续上一博客进行部署:http://www.cnblogs.com/we ...