Android開源項目第一篇:個性化控件(View)篇

本文爲那些不錯的Android開源項目第一篇——個性化控件(View)篇,主要介紹Android上那些不錯個性化的View,包括 ListView、ActionBar、Menu、ViewPager、Gallery、GridView、ImageView、ProgressBar 及其他如Dialog、Toast、EditText、TableView、Activity Animation等等。
% \7 p$ Z  [" N: \7 z
. @/ h4 s8  _0 
+ A: `" S# N9 `% r$ j$ V/ Z
本文爲那些不錯的Android開源項目第一篇——個性化控件(View)篇,**主要介紹Android上那些不錯個性化的View,包括 ListView、ActionBar、Menu、ViewPager、Gallery、GridView、ImageView、ProgressBar 及其他如Dialog、Toast、EditText、TableView、Activity Animation等等。**; {% Q, V. u1 J( S  \, n" v
本文中你可以找到那些精美App中各種有特性的View,如Gmail的左滑出菜單、Google plus的卡片式ListView,Pinterest的瀑布流,微信的左滑刪除,微博的個頁面下拉刷新等等。長期更新,歡迎大家補充和推薦^_^
一、ListView
1. android-pulltorefresh 一個強大的拉動刷新開源項目,支持各種控件下拉刷新
ListView、ViewPager、WevView、ExpandableListView、GridView、(Horizontal6 y& h, F, Z7 [4 z6 {4 s
)ScrollView、Fragment上下左右拉動刷新,比下面johannilsson那個只支持ListView的強大的多。並且他實現的下拉刷新ListView在item不足一屏情況下也不會顯示刷新提示,體驗更好。7 Y5 q* {6 a' D
項目地址:https://github.com/chrisbanes/Android-PullToRefresh
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refreshview-demo.apk?raw=true: L9 \5 K/ C0 V7 s
APP示例:新浪微博各個頁面
2. android-pulltorefresh-listview 下拉刷新ListView* L9 f2 n! M9 N0 V* o1 U% p
項目地址:https://github.com/johannilsson/android-pulltorefresh& v" z4 _% y& x
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refresh-listview-demo.apk?raw=true
PS:這個被很多人使用的項目實際有不少bug,推薦使用上面的android-pulltorefresh7 Y( h. q0 n: @4 A8 C1 s
3. DropDownListView 下拉刷新及滑動到底部加載更多ListView
項目地址:https://github.com/Trinea/AndroidCommon: G% B2 p( d# R
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/TrineaAndroidDemo.apk?raw=true; @1 v$ x# \* m) O4 i
文檔介紹:http://www.trinea.cn/?p=523
4. DragSortListView 拖動排序的ListView5 B0 j" k- Z7 H. p: N
同時支持ListView滑動item刪除,各個Item高度不一、單選、複選、CursorAdapter做爲適配器、拖動背景變化等
項目地址:https://github.com/bauerca/drag-sort-listview6 o$ Z0 Z- w! t: y7 [, K
Demo地址:https://play.google.com/store/apps/details?id=com.mobeta.android.demodslv( `' H5 E$ L1 }) Z& }
APP示例:Wordpress Android
5. SwipeListView 支持定義ListView左右滑動事件,支持左右滑動位移,支持定義動畫時間# f5 K; n0 U' p
項目地址:https://github.com/47deg/android-swipelistview
Demo地址:https://play.google.com/store/apps/details?id=com.fortysevendeg.android.swipelistview
APP示例:微信
6. Android-SwipeToDismiss 滑動Item消失ListView9 G% Z) Q3 c3 x/ `( L
項目地址:https://github.com/romannurik/Android-SwipeToDismiss
支持3.0以下版本見:https://github.com/JakeWharton/SwipeToDismissNOA
Demo地址:https://github.com/JakeWharton/SwipeToDismissNOA/SwipeToDismissNOA.apk/qr_code
7. StickyListHeaders GroupName滑動到頂端時會固定不動直到另外一個GroupName到達頂端的ExpandListView,支持快速滑動,支持Android2.3及以上* W: z4 {) K# D5 z" n: ^  D& o
項目地址:https://github.com/emilsjolander/StickyListHeaders
APP示例:Android 4.0聯繫人
效果圖:https://raw.github.com/emilsjolander/StickyListHeaders/master/demo.gif/ i  {6 H2 t. j9 M" a& }; V$ z
8. pinned-section-listview GroupName滑動到頂端時會固定不動直到另外一個GroupName到達頂端的ExpandListView/ G* j+ ^2 G* B
項目地址:https://github.com/beworker/pinned-section-listview
效果圖:https://raw.github.com/beworker/pinned-section-listview/master/screen1.png+ m6 L! W- t. Q* r" b
9. PinnedHeaderListView GroupName滑動到頂端時會固定不動直到另外一個GroupName到達頂端的ExpandListView
項目地址:https://github.com/JimiSmith/PinnedHeaderListView" }, Y1 {% G- {' P& {+ \3 D
10. QuickReturnHeader ListView/ScrollView的header或footer**,當向下滾動時消失,向上滾動時出現**
項目地址:https://github.com/ManuelPeinado/QuickReturnHeader  W* Q- B1 M% i( ~2 v" \
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/quick-return-header-demo.apk?raw=true
APP示例:google plus
** 11. IndexableListView ListView右側會顯示item首字母快捷索引,點擊可快速滑動到某個item**6 q  }9 I2 W) P( h7 m( e
項目地址:https://github.com/woozzu/IndexableListView3 @! M+ G' v' u- e; b
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/indexable-listview.apk?raw=true1 R; S8 Q0 ~! y
APP示例:微信通訊錄、小米聯繫人
12. CustomFastScrollView ListView快速滑動,同時屏幕中間PopupWindows顯示滑動到的item內容或首字母
項目地址:https://github.com/nolanlawson/CustomFastScrollViewDemo" v( ?* F( g2 u7 V& }6 H' U* S. Z( I
效果圖:https://raw.github.com/nolanlawson/CustomFastScrollViewDemo/master/example.png
13. Android-ScrollBarPanel ListView滑動時固定的Panel指示顯示在scrollbar旁邊
項目地址:https://github.com/rno/Android-ScrollBarPanel
效果展示:https://github.com/rno/Android-ScrollBarPanel/raw/master/demo_capture.png
14. SlideExpandableListView 用戶點擊listView item滑出固定區域,其他item的區域收縮
項目地址:https://github.com/tjerkw/Android-SlideExpandableListView* {, Q; H. I# f7 B% p+ m- ^
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/slide-expandable-listView-demo.apk?raw=true
15. JazzyListView ListView及GridView item以特殊動畫效果進入屏幕,效果包括grow、cards、curl、wave、flip、fly等等" u, ^. J2 e& ?1 |
項目地址:https://github.com/twotoasters/JazzyListView
Demo地址:https://play.google.com/store/apps/details?id=com.twotoasters.jazzylistview.sample! \( j7 g/ e0 k% R5 g0 p. J5 L
效果展示:http://lab.hakim.se/scroll-effects/; ^3 M  T1 ~% ~% `9 O
16. ListViewAnimations 帶Item顯示動畫的ListView,動畫包括底部飛入、其他方向斜飛入、下層飛入、漸變消失、滑動刪除等
項目地址:https://github.com/nhaarman/ListViewAnimations! [* N8 J. K& d2 \& x6 {6 M
Demo地址:https://play.google.com/store/apps/details?id=com.haarman.listviewanimations
APP示例:Google plus、Google Now卡片式進入、小米系統中應用商店、聯繫人、遊戲中心、音樂、文件管理器的ListView、Ultimate、Light Flow Lite、TreinVerkeer、Running Coach、Pearl Jam Lyrics、Calorie Chart、Car Hire、Super BART、DK FlashCards、Counter Plus、Voorlees Verhaaltjes 2.0  n$ E, O3 N: u8 B/ O
17. DevsmartLib-Android 橫向ListView$ q7 g" ~' c; _" k3 ?  c7 ]
項目地址:https://github.com/dinocore1/DevsmartLib-Android
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/horizontal-listview-demo.apk?raw=true
二、ActionBar* D/ ?9 K$ X$ J
1. ActionBarSherlock 爲Android所有版本提供統一的ActionBar,解決4.0以下ActionBar的適配問題* ^. h2 ?  t3 X& |
項目地址:https://github.com/JakeWharton/ActionBarSherlock$ W  h% m% X6 ~
Demo地址:https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.demos( `, H' i3 x1 r
APP示例:太多了。。現在連google都在用9 D  s. C6 t; W6 T, u5 w
2. ActionBar-PullToRefresh 下拉刷新,ActionBar出現加載中提示- y- c& Q/ A* M2 i* P% x
項目地址:https://github.com/chrisbanes/ActionBar-PullToRefresh
Demo地址:https://play.google.com/store/apps/details?id=uk.co.senab.actionbarpulltorefresh.samples.stock' D; m% {( i# t3 l. ^8 X
APP示例:Gmail,Google plus,知乎等# ?' m4 F$ a1 W* r3 O+ @" M6 W5 w
3. FadingActionBar ListView向下滾動逐漸顯現的ActionBar! D. N1 q/ M$ m8 ]$ Z! d
項目地址:https://github.com/ManuelPeinado/FadingActionBar7 g3 x) c2 J7 g- O
Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.fadingactionbar.demo
APP示例:google music,知乎7 k  F* X# S/ Q% w- M8 N
4. NotBoringActionBar google music下拉收縮的ActionBar
項目地址:https://github.com/flavienlaurent/NotBoringActionBar
Demo地址:http://flavienlaurent.com/blog/2013/11/20/making-your-action-bar-not-boring/( `, ?! F( y4 ~, h# I
APP示例:Google音樂7 Z  O6 b4 ~2 R& G8 ]+ O% O$ X
5. RefreshActionItem 帶進度顯示和刷新按鈕的ActionBar4 w& J: P6 }7 P' H
項目地址:https://github.com/ManuelPeinado/RefreshActionItem7 }' w0 o2 B3 _7 ~: P
Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.refreshactionitem.demo0 ]% i, z; Z: |; T/ b
APP示例:The New York Times,DevAppsDirect.
6. GlassActionBar 類似玻璃的有一定透明度的ActionBar: [, x& C4 ?2 G6 D* a  R
項目地址:https://github.com/ManuelPeinado/GlassActionBar; S6 Y- I! w. ^  _% q
Demo地址:https://play.google.com/store/apps/details?id=com.manuelpeinado.glassactionbardemo& N4 t6 j1 h' G5 p0 a6 j
APP示例:google music3 X" r+ Z6 ^; I
**三、Menu **5 {. Q2 ]! g4 r1 H
1. MenuDrawer 滑出式菜單,通過拖動屏幕邊緣滑出菜單,支持屏幕上下左右劃出,支持當前View處於上下層,支持Windows邊緣、ListView邊緣、ViewPager變化劃出菜單等。( A; j* g' D1 h9 A" E, M
項目地址:https://github.com/SimonVT/android-menudrawer
Demo地址:http://simonvt.github.io/android-menudrawer/! b. e( I( E' q6 D' y  s1 P3 Y& u
APP示例:Gmail、Google Music等大部分google app
2. SlidingMenu 滑出式菜單,通過拖動屏幕邊緣滑出菜單,支持屏幕左右劃出,支持菜單zoom、scale、slide up三種動畫樣式出現。
項目地址:https://github.com/jfeinstein10/SlidingMenu% u0 ?1 U- F5 M9 W$ \) C( t) s
Demo地址:https://play.google.com/store/apps/details?id=com.slidingmenu.example
APP示例:Foursquare, LinkedIn, Zappos, Rdio, Evernote Food, Plume, VLC for Android, ESPN ScoreCenter, MLS MatchDay, 9GAG, Wunderlist 2, The Verge, MTG Familiar, Mantano Reader, Falcon Pro (BETA), MW3 Barracks9 A3 D+ ~+ b1 g. F/ S$ U
MenuDrawer和SlidingMenu比較:SlidingMenu支持菜單動畫樣式出現,MenuDrawer支持菜單view處於內容的上下層6 i: _% V% E& l: X/ D% G' o3 x$ m
3. ArcMenu 支持類似Path的左下角動畫旋轉菜單及橫向劃出菜單、圓心彈出菜單
項目地址:https://github.com/daCapricorn/ArcMenu
APP示例:Path8 W/ v$ ~; ^/ J- F
效果圖:(有牆)https://dl.dropboxusercontent.com/u/11369687/preview0.png% w% X4 l: Q3 u
https://dl.dropboxusercontent.com/u/11369687/preview1.png; t; n" F. m# d1 a5 |
https://dl.dropboxusercontent.com/u/11369687/raymenu.png
4. android-satellite-menu 類似Path的左下角動畫旋轉菜單4 m8 {3 Z5 N6 W! R: x: Z- \
項目地址:https://github.com/siyamed/android-satellite-menu
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/satellite-menu-demo.apk?raw=true
APP示例:Path
5. radial-menu-widget 圓形菜單,支持二級菜單2 U9 {; D2 M" x5 Q4 b0 h0 h* P
項目地址:https://code.google.com/p/radial-menu-widget// F7 `: K4 h. s/ a4 J0 j: e; {
效果圖:http://farm8.staticflickr.com/7377/11621125154_d1773c2dcc_o.jpg
6. Android Wheel Menu 圓形旋轉選取菜單
項目地址:https://github.com/anupcowkur/Android-Wheel-Menu
效果圖:https://raw.github.com/anupcowkur/Android-Wheel-Menu/master/graphics/wheel.gif, z! ], r. f' o% Y) `  L1 t
7. FoldingNavigationDrawer滑動並以摺疊方式打開菜單4 q# C" h* ]  x3 C
項目地址:https://github.com/tibi1712/FoldingNavigationDrawer-Android
使用介紹:https://play.google.com/store/apps/details?id=com.ptr.folding.sample( e! ?6 O5 s& W/ ?! W
效果圖:https://lh6.ggpht.com/VnKUZenAozQ0KFAm5blFTGqMaKFjvX-BK2JH-jrX1sIXVTqciACqRhqFH48hc4pm2Q=h310-rw
四、ViewPager 、Gallery- J/ N% e) P! w- V. j2 c
1. Android-ViewPagerIndicator 配合ViewPager使用的Indicator,支持各種位置和樣式7 Q6 a- |8 a( v9 k* o( p8 e7 _- U
項目地址:https://github.com/JakeWharton/Android-ViewPagerIndicator
Demo地址:https://play.google.com/store/apps/details?id=com.viewpagerindicator.sample
APP示例:太多了。。. M& P! e) L  P. E4 X
2. JazzyViewPager 支持Fragment切換動畫的ViewPager,動畫包括轉盤、淡入淡出、翻頁、層疊、旋轉、方塊、翻轉、放大縮小等
項目地址:https://github.com/jfeinstein10/JazzyViewPager
Demo地址:https://github.com/jfeinstein10/JazzyViewPager/blob/master/JazzyViewPager.apk?raw=true' u! E' Q6 f( y+ J
效果圖:類似桌面左右切換的各種效果,不過桌面並非用ViewPager實現而已$ X& D: C1 y% M
3. Android-DirectionalViewPager 支持橫向和縱向(垂直)的ViewPager5 `# l  o9 L  r# G5 F% @8 j9 Z! m
項目地址:https://github.com/JakeWharton/Android-DirectionalViewPager8 C8 s, x" j: A& j
Demo地址:https://market.android.com/details?id=com.directionalviewpager.sample
4. android-pulltorefresh 支持下拉刷新的ViewPager2 B0 E/ Y' ?7 z! J& b
項目地址:https://github.com/chrisbanes/Android-PullToRefresh- \( o, z7 ?8 U# o/ `' ?& w
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/pull-to-refreshview-demo.apk?raw=true
APP示例:新浪微博各個頁面* g/ q0 L  X" k7 @- u
5. FancyCoverFlow支持Item切換動畫效果的類似Gallery View
項目地址:https://github.com/davidschreiber/FancyCoverFlow2 U$ s- C+ a/ \# j/ `9 ^
Demo地址:https://play.google.com/store/apps/details?id=at.technikum.mti.fancycoverflow.samples1 t0 Z- @% |& j5 F
效果圖:https://github-camo.global.ssl.fastly.net/ef5ced52b7b54652b50499521ed797c0188c7a6b/687474703a2f2f64617669647363687265696265722e6769746875622e696f2f46616e6379436f766572466c6f772f73637265656e73686f74322e706e670 W: ]) ^" v2 q3 E/ e& e
6. AndroidTouchGallery 支持雙擊或雙指縮放的Gallery(用ViewPager實現)6 z5 Z: O$ ?, |( h$ |
相比下面的PhotoView,在被放大後依然能滑到下一個item,並且支持直接從url和文件中獲取圖片,
項目地址:https://github.com/Dreddik/AndroidTouchGallery
Demo地址:https://github.com/Trinea/TrineaDownload/blob/master/touch-gallery-demo.apk?raw=true
APP示例:類似微信中查看聊天記錄圖片時可雙擊放大,並且放大情況下能正常左右滑動到前後圖片# X: r4 U0 I1 t# k( z" c& [& Q1 ^& S
7. Salvage view 帶View緩存的Viewpager PagerAdapter,很方便使用
項目地址:https://github.com/JakeWharton/salvage
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章