Android實現自動滾動的瀑布流:ListBuddies
一對自動滾動循環視差ListViews像Expedia的應用程序主頁上的效果。

用法
你需要在你的XML布局中聲明下面的視圖
<com.jpardogo.listbuddies.lib.views.ListBuddiesLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/listbuddies"
android:layout_width="match_parent"
android:layout_height="match_parent"/> 有一堆的布局可選的自定義屬性:
<com.jpardogo.listbuddies.lib.views.ListBuddiesLayout
xmlns:listbuddies="http://schemas.android.com/apk/res-auto"
android:id="@+id/listbuddies"
android:layout_width="match_parent"
android:layout_height="match_parent"
listbuddies:speed="2"
listbuddies:gap="@dimen/gap"
listbuddies:fillGap="@color/frame"
listbuddies:listsDivider="@drawable/divider"
listbuddies:listsDividerHeight="@dimen/divider_height"
listbuddies:autoScrollFaster="right"
listbuddies:scrollFaster="left"/> 屬性說明:
speed: Sets the auto scroll speed (integer). 0 - no autoScrollgap: Space between the lists, the default gap is 3dp (@dimen/default_margin_between_lists).fillGap: Defines the color of the gap, if it is not set the gap is transparentlistDivider: Defines the lists dividers.listsDividerHeight: Divider′s height.autoScrollFaster: Indicate the ListView that will be faster on the parrallax effect during autoScroll. right/left.scrollFaster: Indicate the ListView that will be faster on the parrallax effect during manual scroll. right/left.
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!