会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yl007
博客园
园子
首页
新随笔
联系
管理
订阅
上一页
1
···
7
8
9
10
11
12
13
14
下一页
2016年12月8日
传感器
摘要: 步骤: 1、获取SensorMananger的实例:SensorManager sensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); 2、调用getDefaultSensor()获取任意的传感器类型。 3、监
阅读全文
posted @ 2016-12-08 11:30 yl007
阅读(162)
评论(0)
推荐(0)
2016年12月7日
android中的位置服务(LBS)
摘要: 自己的位置:LocationManager 基本用法:创建实例:LocationManager locationManager = (LocationManager)getSystemService(Context,LOCATION_SERVICE); 位置提供器:GPS_PROVIDER、NETW
阅读全文
posted @ 2016-12-07 16:35 yl007
阅读(609)
评论(0)
推荐(0)
网络HTTP协议
摘要: WebView:在应用中嵌入一个浏览器 webView需要在AndroidManifest.xml中声明权限 HTTP协议 原理:客户端向服务端发送一条HTTP请求,服务器收到请求后返回数据给客户端,客户端再对数据进行解析和处理。 发送请求:HttpURLConnection和HttpClient两
阅读全文
posted @ 2016-12-07 15:48 yl007
阅读(289)
评论(0)
推荐(0)
2016年12月6日
Service服务
摘要: Android多线程: 定义线程的2种方式: 1、继承Thread类,重写run()方法,new一个实例,用start()方法启动:new MyThread().start(); 2、实现Runnable接口:new Thread(new Runnable()){实现run()} 子线程中更新UI:
阅读全文
posted @ 2016-12-06 16:28 yl007
阅读(280)
评论(0)
推荐(0)
2016年12月5日
通知Notification
摘要: 步骤: 1、调用getSystemService()获取NotificationManager:NotificationManager manager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE); 2、创
阅读全文
posted @ 2016-12-05 17:49 yl007
阅读(269)
评论(0)
推荐(0)
2016年11月25日
ContentProvider跨进程共享数据
摘要: 借用ContentResolver类访问ContentProvider中共享的数据。通过getContentResolver()方法获得该类的实例。 ContentResolver中的方法:insert()、updata()、delete()、query() ContentResolver中增删改查
阅读全文
posted @ 2016-11-25 16:33 yl007
阅读(873)
评论(0)
推荐(0)
2016年11月24日
SQLite数据库
摘要: 数据持久化: 1、文件存储 适合用于存储一些简单的文本数据或二进制数据 存储数据:openFileOutput(文件名,操作模式),返回值为一个FileOutputStream对象,借助FileOutputStream对象构建出OutputStreamWriter对象,再借助OutputStream
阅读全文
posted @ 2016-11-24 16:54 yl007
阅读(364)
评论(0)
推荐(0)
2016年11月14日
广播Broadcast Receiver
摘要: 广播的类型: 1、标准广播(Normal broadcat) 完全异步执行的广播,所有广播接收器同一时间接收广播消息。 效率高,但无法被截断。 2、有序广播 同步执行的广播,同一时刻只能有一个广播接收器接收广播消息,当执行完毕后才会继续传递。 优先级高的先收到广播,并且可以截断广播。 接收系统广播:
阅读全文
posted @ 2016-11-14 16:27 yl007
阅读(245)
评论(0)
推荐(0)
2016年11月11日
Fragment碎片
摘要: Fragment的生命周期: onAttach():onAttach()方法会在Fragment与Activity窗口关联后立刻调用。 onCreate():在调用完onAttach()执行完之后,立即就会调用onCreate()方法,可以在Bundle对象中获取一些在Activity中传过来的数据
阅读全文
posted @ 2016-11-11 16:45 yl007
阅读(239)
评论(0)
推荐(0)
Android的UI设计
摘要: 一、Android控件 1、TextView 属性:id、width、height、gravity(对齐方式)、textSize(文字大小)、textColor(文字颜色) 2、Button 属性:id、width、height... 监听器:setOnClickListener() 3、EditT
阅读全文
posted @ 2016-11-11 13:27 yl007
阅读(169)
评论(0)
推荐(0)
上一页
1
···
7
8
9
10
11
12
13
14
下一页
公告