android應用開發常用工具包

1、SlidingMenu(slidingMenuDemos)

左右側滑:https://github.com/jfeinstein10/SlidingMenu

2、Android-PullToRefresh 

上下拉刷新:https://github.com/chrisbanes/Android-PullToRefresh

3、android-asyne-http

android-async-http是Android上的一個異步、基於回調的HTTP客戶端開發包,建立在Apache的HttpClient庫上。

https://github.com/loopj/android-async-http

4、Android-Universal-Image-Loader

Android上最讓人頭疼的莫過於從網絡獲取圖片、顯示、回收,任何一個環節有問題都可能直接OOM,這個項目或許能幫到你

https://github.com/nostra13/Android-Universal-Image-Loader

5、ActionBarSherlock

它是一個獨立的庫,通過一個API和主題,開發者就可以很方便地使用所有版本的Android動作欄的設計模式。

對於Android4.0及更高版本,ActionBarSherlock可以自動使用本地ActionBar實現,而對於之前沒有ActionBar功能的版本,基於IceCreamSandwich的自定義動作欄實現將自動圍繞佈局。能夠讓開發者輕鬆開發一款帶動作欄(ActionBar)的應用,並且適用於Android 2.x及其以上所有版本。

https://github.com/JakeWharton/ActionBarSherlock

http://actionbarsherlock.com/



參考:

以PullToRefresh爲例:

  1. 下載zip,解壓到桌面
  2. 打開eclipse,File-Import-Existing Android Code Into Workspace
  3. 選中library文件,導入到eclipse中
  4. 打開此library,右鍵library,properties-Android-Library-勾選Is Library
  5. 打開你的程序後,右鍵你的主程序,properties-Android-Library-Add,選擇library文件

導入的基本步驟就這樣,接下來是如何使用
  1. 找到你的程序-layout-xml添加一個
    <com.handmark.pulltorefresh.library.PullToRefreshListView
    android:id="@+id/pull_to_refresh_listView" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"/>
  2. 回到MainActivity中,頭文件中添加一段代碼
    import com.handmark.pulltorefresh.library.PullToRefreshListView; 
  3. 之後把你需要用到的listview全部改爲PullToRefreshListView,例如
    private PullToRefreshListView mPullRefreshListView;
  4. 接着就像listview一樣使用吧


其他: 

1、https://github.com/chrisbanes/PhotoView

android 圖片瀏覽功能  圖片放大縮小   

使用 photoview 雙擊或雙指縮放的ImageView 

使用多點觸控和雙擊。

滾動,以平滑滾動甩。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章