摘要: 1 private long clickBackTime = 0; //定义一个long类型的变量用于记录点击返回键的时间 2 3 @Override 4 public boolean onKeyDown(int keyCode, KeyEvent event) { 5 if(keyCode == KeyEvent.KEYCODE_BACK && event.getAct... 阅读全文
posted @ 2016-07-27 16:51 617844863 阅读(158) 评论(0) 推荐(0) 编辑
摘要: C)MyIntentservice部分的代码 阅读全文
posted @ 2016-03-28 23:34 617844863 阅读(184) 评论(0) 推荐(0) 编辑
摘要: A)MainActivity 类的代码 1 package com.example.cms.service; 2 3 import android.app.Service; 4 import android.content.ComponentName; 5 import android.content.Intent; 6 import android.content.ServiceC... 阅读全文
posted @ 2016-03-28 20:56 617844863 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 学习笔记:1)当我们在别的应用内调用你某个程序的Activity的时候需要为这个Activity配置属性exported="true" 阅读全文
posted @ 2016-03-27 12:22 617844863 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 学习笔记:1)Cursor是SQLite 数据库查询返回的行数集合 2)SQLiteDatabase的execSQL()方法可执行任意的SQL语句 但是因为其没有返回值 所以一般执行DDL和DML语句 1 package com.example.cms.sqlite; 2 /** 3 *示范如何在A 阅读全文
posted @ 2016-03-11 20:55 617844863 阅读(171) 评论(0) 推荐(0) 编辑