随笔分类 -  Android_Mars学习笔记

摘要:一、 * class LooperThread extends Thread { * public Handler mHandler; * * public void run() { * Looper.prepare(); * * mHandler = new Handler() { * publi 阅读全文
posted @ 2016-02-23 17:06 shamgod 阅读(196) 评论(0) 推荐(0)
摘要:1 import android.app.Activity; 2 import android.content.Context; 3 import android.hardware.Sensor; 4 import android.hardware.SensorEvent; 5 import and 阅读全文
posted @ 2016-02-22 17:06 shamgod 阅读(218) 评论(0) 推荐(0)
摘要:1 import android.app.Activity; 2 import android.content.Context; 3 import android.hardware.Sensor; 4 import android.hardware.SensorEvent; 5 import and 阅读全文
posted @ 2016-02-22 17:06 shamgod 阅读(363) 评论(0) 推荐(0)
摘要:一、简介 二、代码1.java (1)MainActivity.java 1 import android.app.Activity; 2 import android.content.Context; 3 import android.hardware.Sensor; 4 import andro 阅读全文
posted @ 2016-02-22 16:35 shamgod 阅读(249) 评论(0) 推荐(0)
摘要:1. 2. 1 import android.app.Activity; 2 import android.content.Context; 3 import android.hardware.Sensor; 4 import android.hardware.SensorEvent; 5 impo 阅读全文
posted @ 2016-02-22 16:06 shamgod 阅读(514) 评论(0) 推荐(0)
摘要:1 1 @Override 2 public void onCreate(Bundle savedInstanceState) { 3 super.onCreate(savedInstanceState); 4 setContentView(R.layout.main); 5 //获取SensorM 阅读全文
posted @ 2016-02-22 15:39 shamgod 阅读(403) 评论(0) 推荐(0)
摘要:1. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //得到SensorManager对象 s 阅读全文
posted @ 2016-02-22 15:17 shamgod 阅读(266) 评论(0) 推荐(0)
摘要:一、简介 二、代码流程 1.private Map<String, SoftReference<Drawable>> imageCache = new HashMap<String, SoftReference<Drawable>>();来起到缓存图片的作用 2.每当要访问图片,先在map找,找不到 阅读全文
posted @ 2016-02-22 14:41 shamgod 阅读(255) 评论(0) 推荐(0)
摘要:一、简介 运行结果 二、代码1.xml(1)activity_main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/and 阅读全文
posted @ 2016-02-22 13:32 shamgod 阅读(209) 评论(0) 推荐(0)
摘要:一、代码 1.xml(1)activity_main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 a 阅读全文
posted @ 2016-02-22 12:21 shamgod 阅读(263) 评论(0) 推荐(0)
摘要:一、代码流程 1.MainActivity会开启PrepareRequestTokenActivity 2.PrepareRequestTokenActivity会根据配置文件的CONSUMER_KEY、CONSUMER_SECRET生成consumer 根据REQUEST_URL、ACCESS_U 阅读全文
posted @ 2016-02-22 11:33 shamgod 阅读(430) 评论(0) 推荐(0)
摘要:一、代码流程 1.组织好sign-post需要的token,secrect 2.组织好发微博需要的信息 3.用sign-post进行签名 4.把签名结果从header中拿出来,转成entity,用httpclient以post的形式发送微博 二、简介 三、代码1.xml(1)activity_mai 阅读全文
posted @ 2016-02-22 11:04 shamgod 阅读(299) 评论(0) 推荐(0)
摘要:一、代码 1.xml(1)activity_main.xml 1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/to 阅读全文
posted @ 2016-02-21 21:34 shamgod 阅读(341) 评论(0) 推荐(0)
摘要:一、代码 1.xml(1)activity_main.xml 1 <TextView 2 android:layout_width="wrap_content" 3 android:layout_height="wrap_content" 4 android:text="发送Http请求" 5 an 阅读全文
posted @ 2016-02-21 15:26 shamgod 阅读(364) 评论(0) 推荐(0)
摘要:一、简介 二、代码1.xml(1)activity_main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 阅读全文
posted @ 2016-02-21 14:16 shamgod 阅读(198) 评论(0) 推荐(0)
摘要:一、代码 1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:or 阅读全文
posted @ 2016-02-21 11:36 shamgod 阅读(302) 评论(0) 推荐(0)
摘要:一、OAuth简介 阅读全文
posted @ 2016-02-21 09:40 shamgod 阅读(151) 评论(0) 推荐(0)
摘要:一、代码 1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:or 阅读全文
posted @ 2016-02-21 09:36 shamgod 阅读(194) 评论(0) 推荐(0)
摘要:一、简介 二、代码1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 androi 阅读全文
posted @ 2016-02-20 23:08 shamgod 阅读(226) 评论(0) 推荐(0)
摘要:一、简介 二、代码1.xml(1)main.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 androi 阅读全文
posted @ 2016-02-20 22:30 shamgod 阅读(193) 评论(0) 推荐(0)

haha