随笔分类 -  代码块

摘要:Activity的生命周期:Fragment的生命周期: 阅读全文
posted @ 2015-10-27 14:11 小白第二 阅读(253) 评论(0) 推荐(0) 编辑
摘要:public static boolean isServiceExisted(Context context, String className) { ActivityManager activityManager = (ActivityManager) context ... 阅读全文
posted @ 2015-10-27 14:07 小白第二 阅读(9106) 评论(0) 推荐(0) 编辑
摘要:1.从google搜索内容 Intentintent=newIntent(); intent.setAction(Intent.ACTION_WEB_SEARCH); intent.putExtra(SearchManager.QUERY,"searchString") st... 阅读全文
posted @ 2015-10-27 14:04 小白第二 阅读(943) 评论(0) 推荐(0) 编辑
摘要:/** * 菜单、返回键响应 */ @Override public boolean onKeyDown(int keyCode, KeyEvent event) { // TODO Auto-generated method stub if(keyCode == Key... 阅读全文
posted @ 2015-10-27 13:55 小白第二 阅读(548) 评论(0) 推荐(0) 编辑
摘要:在该listview的点击事件中加入一下代码即可listView.setSelectionFromTop(position, 0); 阅读全文
posted @ 2015-10-27 13:51 小白第二 阅读(2463) 评论(0) 推荐(0) 编辑
摘要:1 /** 2 * 解压缩文件到指定的目录. 3 * 4 * @param unZipfileName 5 * 需要解压缩的文件(带路径) 6 * @param mDestPath 7 * 解... 阅读全文
posted @ 2015-10-27 13:49 小白第二 编辑