- 博客(12)
- 收藏
- 关注
原创 GL_BOOK_12
Chapter 13 全局获取context的技巧 MyApplication extends Application public class MyApplication extends Application { private static Context context; @Override public void onCreate() { sup
2016-06-30 11:30:44 271
原创 GL_BOOK_11
CHAPTER 12 传感器 光照传感器 加速度传感器 地磁传感器 压力传感器 温度传感器光照传感器 自动调整屏幕亮度 SensorManager sensorManager 是所有传感器的管理器 getSystemService(Context.SENSOR_SERVICE) 通过调用 getDefaultSensor(Sensor.TYPE_LIGHT); 来得到相应的传感器类型
2016-06-24 17:30:30 358
原创 GL_BOOK_10
CHAPTER 10 LBS 基于位置服务 LocationManager getSystemService(Context.LOCATION_SERVICE); 由三种位置提供器来确定设备当前位置 分别是 GPS_PROVIDER , NETWORK_PROVIDER , PASSIVE_PROVIDER 尤其前两种方式使用较多 第一种GPS 定位比较精确但耗电较多 第二种网络定
2016-06-22 17:41:10 319
原创 GL_BOOK_9
Chapter 10 1 WebViewprivate void initWebViewConfig(final String content) { mHandler.post(new Runnable() { @Override public void run() { getImgAlist(Html.
2016-06-20 17:31:01 327
原创 GL_BOOK_8
Chapter 9 AsyncTask<Params, Progress, Result>()new AsyncTask<Void, Integer, Boolean>() { @Override protected Boolean doInBackground(Void... params) { Log.i("haha"
2016-06-16 11:45:42 772
原创 GL_BOOK_7
通知 比较详细的 详见 这里写链接内容Intent intent = new Intent(this, MainActivity.class);//这里 PendingIntent 可以通过三种方式getActivity、getBroadcast\getservice PendingIntent pi = PendingIntent.getActivity(this, 0, i
2016-06-13 16:19:23 434
原创 GL_BOOK_6
Chapter 7 跨程序共享数据 内容提供器虽然 文件和SharedPreferences 存储 提供 MODE_WORLD_READABLE\MODE_WORLD_WRITEABLE 这两种操作模式 ,用于供给其他应用程序可访问当前应用数据 , 但该方式 已被Android4.2版本中废弃了 不推荐使用ContentProvider 内容提供者 主应用于不同应用程序间实现数据的共享 同时保证
2016-06-06 17:36:26 340
原创 GL_BOOK_5
Chapter 6 数据存储 持久化Android 系统提供三种方式:文件存储 、 SharedPreference 存储以及数据库 当然还可以保存到SD卡中 没有上述三种方式 安全文件存储 : 存:openFileOutput FileOutputStream android.content.ContextWrapper.openFileOutput(String name, int m
2016-06-03 17:29:02 317
原创 GL_BOOK_4
Git首先 配置身份 windows Git Bash 打开 git config –global user.name “xxx” git config –global user.email “[email protected]”配置完毕 检测是否配置成功 git config –global user.name git config –global user.email在某项目建立git代码库
2016-06-03 13:57:27 302
原创 GL_BOOK_3
Chapter 4 碎片1 简单用法 <Button android:id="@+id/button" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:text="cl
2016-06-03 11:16:21 312
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人