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

25 個值得收藏的 Android 開源 UI 框架

編輯:關於 Android 程式設計

前言

忙完一段落,難得有個空檔,突然興起念頭想自己動手寫一支 App。既然要寫,與其每個效果都從零刻起,不如先盤點市面上現成的開源元件——省時省力,成品質感還更好。以下整理的都是我在 UI 層面挑過、覺得好用的框架,後續若有機會再補上網路請求、資料庫這類非 UI 的開源方案。

名單裡有幾個反覆出現的同一個作者,不難看出 Yalantis 這團隊在動畫細節上的功力,幾乎是 Android 開源視覺效果的半壁江山。

1. Side-Menu.Android

側滑分類選單,Yalantis 出品。轉場動畫流暢,適合需要多層級導覽的應用。

專案位址:https://github.com/Yalantis/Side-Menu.Android

2. Context-Menu.Android

快速整合帶有精緻動畫的上下文選單,同樣出自 Yalantis。

專案位址:https://github.com/Yalantis/Context-Menu.Android

3. Pull-to-Refresh.Rentals-Android

可高度自訂的下拉刷新實作,Yalantis 出品。

專案位址:https://github.com/Yalantis/Pull-to-Refresh.Rentals-Android

4. Titanic

讓文字呈現水位漲落的 TextView,視覺效果相當有記憶點。

專案位址:https://github.com/RomainPiel/Titanic

5. AndroidSwipeLayout

滑動式 Layout,支援單一 View、ListView 與 GridView。

專案位址:https://github.com/daimajia/AndroidSwipeLayout

6. Android Typeface Helper

想換字型卻不想四處改寫程式碼?這個庫幫你把自訂字型的事收攏乾淨。

專案位址:https://github.com/norbsoft/android-typeface-helper

7. android-lockpattern

圖案解鎖元件。Android 開機與支付類應用的密碼解鎖,用的就是這一類實作。

專案位址:https://code.google.com/p/android-lockpattern/

Demo:https://play.google.com/store/apps/details?id=group.pals.android.lib.ui.lockpattern.demo

使用說明:https://code.google.com/p/android-lockpattern/wiki/QuickUse

8. ToggleButton

狀態切換按鈕,外觀與手感都向 iOS 靠攏,以純 View 方式實作。

專案位址:https://github.com/zcweng/ToggleButton

9. WilliamChart

繪圖庫,提供折線圖、長條圖與堆疊長條圖三種型別,相容 Android 2.2 以上。

專案位址:https://github.com/diogobernardino/WilliamChart

Demo:https://play.google.com/store/apps/details?id=com.db.williamchartdemo

範例專案:https://github.com/diogobernardino/WilliamChart/tree/master/sample

10. GuideBackgroundColorAnimation

讓 ViewPager 在滑動過程中背景色平滑漸變,很適合引導頁。

專案位址:https://github.com/TaurusXi/GuideBackgroundColorAnimation

11. Euclid

簡潔風格的使用者簡歷頁,Yalantis 出品。

專案位址:https://github.com/Yalantis/Euclid

12. InstaMaterial

一組以 Instagram 為靈感的 Material Design 概念設計。

專案位址:https://github.com/frogermcs/InstaMaterial

13. SpringIndicator

用貝茲曲線做出黏連效果的頁面指示器。

專案位址:https://github.com/chenupt/SpringIndicator

14. BezierDemo

仿 QQ 的氣泡訊息,拖曳後黏連消失的效果。

專案位址:https://github.com/chenupt/BezierDemo

15. FoldableLayout

模擬信紙被展開的折疊動畫。

專案位址:https://github.com/alexvasilkov/FoldableLayout

16. Taurus

下拉刷新,Yalantis 出品——看到這裡是不是有點似曾相識?

專案位址:https://github.com/Yalantis/Taurus

17. PersistentSearch

點擊搜尋後,輸入框就地展開,不必跳頁。

專案位址:https://github.com/Quinny898/PersistentSearch

18. circular-progress-button

內建進度顯示的按鈕元件。

專案位址:https://github.com/dmytrodanylyk/circular-progress-button

19. discrollview

捲動時子元素各自呈現不同動畫的 ScrollView,也就是網頁上說的視差捲動。

專案位址:https://github.com/flavienlaurent/discrollview

20. sweet-alert-dialog

帶動畫效果的自訂對話框樣式。

專案位址:https://github.com/pedant/sweet-alert-dialog

21. android-floating-action-button

Material Design 風格的浮動操作按鈕。

專案位址:https://github.com/futuresimple/android-floating-action-button

22. android-collapse-calendar-view

可在月視圖與週視圖之間切換的日曆元件。

專案位址:https://github.com/blazsolar/android-collapse-calendar-view

23. NumberProgressBar

簡約又帶點質感的數字進度條。

專案位址:https://github.com/daimajia/NumberProgressBar

24. CircularProgressView

以自訂 View 實作的 Material 風格載入提示,相容性極好,幾乎任何版本都能跑。

專案位址:https://github.com/rahatarmanahmed/CircularProgressView

25. OriSim3D-Android

用 OpenGL 模擬折紙,完整重現一張紙折成小船的過程。

專案位址:https://github.com/RemiKoutcherawy/OriSim3D-Android

怎麼挑?

這份清單涵蓋導覽、載入、圖表、表單、動畫幾個主要面向。實務上建議先確認元件是否仍在維護、minSdk 是否與專案相符,再決定要不要引入——特別是那些以動畫效果取勝的庫,往往伴隨額外的效能成本,用在對的位置才有價值。另外,如果只需要其中一兩個功能,自己刻一個輕量版本,通常比引入整個大而全的庫划算。

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