原创 第四十四天 指南針、百度地圖

指南針(方法一) <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.and

原创 第三十四天Service、IntentService、Thread、AsyncTask

Service、IntentService(不同在於:IntentService自身包含一個線程,還包含消息隊列) Service、IntentService的註冊 <service android:name=".MyService">

原创 第四十一天 Path(畫路徑)、Bitmap、Slider(手機聯繫人首字母選項)

兩圖形的關係圖: MyPathView public class MyPathView extends View { private int width; private int height; private

原创 第四十二天 BitmapView(蒙版,或模擬給圖片打馬賽克)

BitmapView public class BitmapView extends View { private int width; private int height; private Bitmap mBi

原创 第三十二天FragmentAdapter、數據存儲、SQLite

Fragment的生命週期 FragmentAdapter activity_layout <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http

原创 第四十天 自定義View(時鐘)---convas

Convas activity_main <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://s

原创 第三十五天 模擬音樂播放器MediaPlayer

MediaPlayer MainActivity: public class MainActivity extends Activity { private ListView mListView; private

原创 第三十七天 HTTPClient(doget、dopost)

HttpClientActivity public class HTTPClientActivity extends Activity implements View.OnClickListener{ private Button

原创 四種單例設計模式

單例模式特點: 1、單例類只能有一個實例。 2、單例類必須自己創建自己的唯一實例。 3、單例類必須給所有其他對象提供這一實例。 設計模式: 一、餓漢方式的單例模式(線程安全,但效率比較低,一開始就要加載類 ,new一個對象) /** *

原创 第三十一天 ViewPager(帶小圓點的圖片左右循環滑動)、Fragment

ViewPager 佈局 activity_main <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="