随笔分类 - Android_Mars学习笔记
摘要:一、 * class LooperThread extends Thread { * public Handler mHandler; * * public void run() { * Looper.prepare(); * * mHandler = new Handler() { * publi
阅读全文
摘要:1 import android.app.Activity; 2 import android.content.Context; 3 import android.hardware.Sensor; 4 import android.hardware.SensorEvent; 5 import and
阅读全文
摘要:1 import android.app.Activity; 2 import android.content.Context; 3 import android.hardware.Sensor; 4 import android.hardware.SensorEvent; 5 import and
阅读全文
摘要:一、简介 二、代码1.java (1)MainActivity.java 1 import android.app.Activity; 2 import android.content.Context; 3 import android.hardware.Sensor; 4 import andro
阅读全文
摘要:1. 2. 1 import android.app.Activity; 2 import android.content.Context; 3 import android.hardware.Sensor; 4 import android.hardware.SensorEvent; 5 impo
阅读全文
摘要:1 1 @Override 2 public void onCreate(Bundle savedInstanceState) { 3 super.onCreate(savedInstanceState); 4 setContentView(R.layout.main); 5 //获取SensorM
阅读全文
摘要:1. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //得到SensorManager对象 s
阅读全文
摘要:一、简介 二、代码流程 1.private Map<String, SoftReference<Drawable>> imageCache = new HashMap<String, SoftReference<Drawable>>();来起到缓存图片的作用 2.每当要访问图片,先在map找,找不到
阅读全文
摘要:一、简介 运行结果 二、代码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
阅读全文
摘要:一、代码 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
阅读全文
摘要:一、代码流程 1.MainActivity会开启PrepareRequestTokenActivity 2.PrepareRequestTokenActivity会根据配置文件的CONSUMER_KEY、CONSUMER_SECRET生成consumer 根据REQUEST_URL、ACCESS_U
阅读全文
摘要:一、代码流程 1.组织好sign-post需要的token,secrect 2.组织好发微博需要的信息 3.用sign-post进行签名 4.把签名结果从header中拿出来,转成entity,用httpclient以post的形式发送微博 二、简介 三、代码1.xml(1)activity_mai
阅读全文
摘要:一、代码 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
阅读全文
摘要:一、代码 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
阅读全文
摘要:一、简介 二、代码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"
阅读全文
摘要:一、代码 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
阅读全文
摘要:一、OAuth简介
阅读全文
摘要:一、代码 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
阅读全文
摘要:一、简介 二、代码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
阅读全文
摘要:一、简介 二、代码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
阅读全文