Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲

Android 快速開發框架 CommonLibsForAndroid 介紹(附 Demo)

編輯:關於 Android 程式設計

這個專案的所有功能都提煉自實際項目,做它的初衷只是為了方便自己開發 Android 應用。由於時間有限,目前仍有大量內容未整理進這個開源庫,doc 和 demo 也有待完善,我會盡快補齊;其中一些不盡合理的地方,也會逐步改進。

歡迎大家提出各種意見,更歡迎 fork 與 pull request。

CommonLibsForAndroid

Using CommonLibs is a fast way to help you develop Android apps
快速開發 Android 應用的框架

簡介

這個庫目前主要包含 View Injection、ORM、非同步網絡請求與圖片加載、自動化腳本測試、磁碟 LRU 等功能,同時提供了 TripleDes、WebView 快速設置、Md5 處理、String 處理等常用工具類,還有多種 UI 控件效果,並且這些能力正在持續增加。

每加入一個新功能,我都會盡量同步補上對應的 Demo;部分較早的功能暫無 Demo,但我會逐步完善。目前 Demo 主要覆蓋了 UI 模組與 View Injection 兩部分,內容雖略顯單調,卻能直觀看到不少有趣的 UI 效果。接下來我會努力讓 Demo 更有意思,並涵蓋 ORM、非同步圖片與網絡加載等模組。Demo 的 apk 可直接下載體驗。

Demo 使用說明

Demo 依賴 appcompat 與 CommonLibs,你可以在 IDE 或配置檔中添加依賴。部分 IDE 需要開啟 annotation 的編譯(因為用到了 Butter Knife),如果不清楚如何開啟,可參考 IntelliJ IDEA Configuration for Butter Knife 或 Eclipse Configuration for Butter Knife。

UI Modules

  • 支持 Android 2.3 上的動畫效果
  • 可滑動刪除項目的 EnhanceListView
  • 讓 TextView 更生動的 Shimmer 與 Titanic 效果
  • 類似 Gmail / Google+ 風格的 SmoothProgressBar
  • 類似 Flipboard 的翻頁效果 Flip View
  • 支持縮放手勢的 PhotoView
  • 更易定製的 PagerSlidingTabStrip 與 ViewPagerIndicator
  • 滑動返回、帶動畫的 ExpandableListView、圓角圖片、圖像模糊等多種效果

更新記錄

2014.6.12:新增類說明,部分方法命名更清晰。

2014.6.14:加入 NineOldAndroids 以支持 Android 2.1~2.3(不需要時可移除)。

2014.6.16:新增可滑動刪除的 EnhanceListView,並將 NineOldAndroids 移入主 Lib 工程方便配置。

2014.6.18:加入 Shimmer-Android。

2014.6.19:加入 Sample Demo(簡單但會持續補充)。

2014.6.20:加入 TileView 及其 Demo。

2014.6.22:加入 colors 資源。

2014.6.24:加入 SmoothProgressBar。

2014.6.25:加入 StickyGridHeaders(頭部浮現與按字母過濾)。

2014.6.26:加入類 Flipboard 的翻頁效果與手勢縮放圖片的 PhotoView。

2014.6.27:加入多種 Square Progress、FolderableLayout、FoldingNavigationDrawer。

2014.6.28:加入日曆選擇控件與 Demo.apk。

2014.6.30:加入 FaceCrop、KenBurns、PanningView、ProgressWheel、ViewpagerSlidingTabs。

開源致謝

本框架使用了眾多優秀的開源專案,特此感謝原作者:

1. JakeWharton 的 Butter Knife(View Injection)
2. loopj 的 Asynchronous Http Client for Android
3. nostra13 的 Universal Image Loader
4. greenrobot 的 greenDAO
5. pardom 的 ActiveAndroid
6. JakeWharton 的 DiskLruCache
7. Issacw0ng 的 SwipeBackLayout
8. google-gson
9. RobotiumTech 的 robotium
10. JakeWharton 的 NineOldAndroids
11. JakeWharton 的 Android-ViewPagerIndicator

如有遺漏之處,歡迎指正。大家若有想要的功能,也歡迎隨時提意見。

License

Copyright 2014 Marshal Chen

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © Android教程網 All Rights Reserved