- 博客(5)
- 资源 (1)
- 收藏
- 关注
转载 Android后台操作
一.service 1.创建service要创建一个Service需要创建一个继承Service的类,并重写onCreate和onBind方法。 创建完成后,需要在application标签内注册此Service,可加入permission属性来确保Service只能由自己的程序启动和停止。 2.执行Service当一个Service通过startService启动时,就会调用onStart
2015-05-05 09:57:34 335
转载 android的数据存储方式
本文介绍Android中的5种数据存储方式。 数据存储在开发中是使用最频繁的,在这里主要介绍Android平台中实现数据存储的5种方式,分别是: 1 使用SharedPreferences存储数据 2 文件存储数据 3 SQLite数据库存储数据 4 使用ContentProvider存储数据 5 网络存储数据 下面将为大家一一详细介绍。 第一种: 使用Share
2015-05-04 09:35:08 251
转载 android的Intent用法实例
分类: 1.无参数Activity跳转 Intent it = new Intent(Activity.Main.this, Activity2.class);startActivity(it); 2.向下一个Activity传递数据(使用Bundle和Intent.putExtras) Intent it = new Intent(Activity.
2015-04-28 08:37:33 297
转载 Android学习之常见的布局方式
第一种:线性布局 这种布局相对是比较简单的,要么竖向排列,要么横向排列 属性分别为: android:orientation= " horizontal " android:orientation= "vertical" 。 [html] view plaincopy xml version="1.0" encoding="utf-8"?> Lin
2015-04-27 10:13:29 245
转载 java中的多线程
java多线程实现有两种方式,一种是继成Thread类,另外一种是实现Runable接口。 对于直接继承Thread的类来说,代码大致框架是: 1 2 3 4 5 6 7 8 9 10 11 12 class 类名 extends Thread{ 方法1; 方法2; … public void run(){ // other cod
2015-04-22 16:52:14 261
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人