Android AbsListView 的item動畫類庫 —— JazzyListView

來源:互聯網
上載者:User

標籤:

https://github.com/twotoasters/JazzyListView/tree/master/sample

github:https://github.com/twotoasters/JazzyListView

 

 

使用這個類庫還是很簡單的,引入它的庫,使用庫裡所定義的ListView和GridView即可。

 

如需要自訂一個動畫效果,那麼實現一個JazzyEffect,並添加到JazzyHelper中即可。

 

裡面的自訂屬性

 

[html] view plain copy  print?
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <resources>  
  3.     <!-- android.widget.AbsListView 都可以用的 動畫效果 -->  
  4.     <declare-styleable name="JazzyListView" >  
  5.         <attr name="effect" format="enum" >  
  6.             <!--   -->  
  7.             <enum name="standard" value="0" />  
  8.             <!-- 成長型,從小變大 -->  
  9.             <enum name="grow" value="1" />  
  10.             <!-- 卡片 翻開 -->  
  11.             <enum name="cards" value="2" />  
  12.             <!-- 盤繞在左,向右展開 -->  
  13.             <enum name="curl" value="3" />  
  14.             <!-- 波浪式:左到右  -->  
  15.             <enum name="wave" value="4" />  
  16.             <!-- 蹦跳式 -->  
  17.             <enum name="flip" value="5" />  
  18.             <!-- 類型卡片,飛滾式 -->  
  19.             <enum name="fly" value="6" />  
  20.             <!-- 跟上面類,反向 -->  
  21.             <enum name="reverse_fly" value="7" />  
  22.             <!-- 螺旋 -->  
  23.             <enum name="helix" value="8" />  
  24.             <!-- 扇形飄動 -->  
  25.             <enum name="fan" value="9" />  
  26.             <!-- 傾斜,看起來是 挻起來的效果 -->  
  27.             <enum name="tilt" value="10" />  
  28.             <!-- 拉鏈式, 左右交織 -->  
  29.             <enum name="zipper" value="11" />  
  30.             <!-- 淡到明 -->  
  31.             <enum name="fade" value="12" />  
  32.             <!-- 旋轉 -->  
  33.             <enum name="twirl" value="13" />  
  34.             <!-- 滑動式 -->  
  35.             <enum name="slide_in" value="14" />  
  36.         </attr>  
  37.         <!-- 僅在新item 有動畫 -->  
  38.         <attr name="only_animate_new_items" format="boolean" />  
  39.         <!-- 僅在飛滾時 有動畫-->  
  40.         <attr name="only_animate_fling" format="boolean" />  
  41.         <!--  -->  
  42.         <attr name="simulate_grid_with_list" format="boolean" />  
  43.         <!-- 最大速率 -->  
  44.         <attr name="max_velocity" format="integer" />  
  45.     </declare-styleable>  
  46. </resources>  
這些屬性可以通過代碼設定給ListView、GridView;也可以在xml中使用。

 

 

 
頂
0

Android AbsListView 的item動畫類庫 —— JazzyListView

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.