讓任何Android View實現閃爍效果:Shimmer effect for Android

Shimmer 是一個Java庫提供了一種簡便的方式來在你的Android app中為任何view增加一種閃爍效果。它非常適用于作為一個不顯眼的加載指示器。它最初由非死book開發。

Shimmer for Android實現成一個布局, 這意味著你可以簡單地在任何中View嵌套ShimmerFrameLayout標簽,然后從你的代碼中啟動動畫。

用法:

The following snippet shows how you can useShimmerFrameLayout

<com.非死book.shimmer.ShimmerFrameLayout
     android:id=“@+id/shimmer_view_container”
     android:layout_width=“wrap_content”
     android:layout_height="wrap_content"
>
     ...(your complex view here)...
</com.非死book.shimmer.ShimmerFrameLayout>


In your code, you can then start the animation:

ShimmerFrameLayout container = 
  (ShimmerFrameLayout) findViewById(R.id.shimmer_view_container);
container.startShimmerAnimation();

項目主頁:http://www.baiduhome.net/lib/view/home/1426080125185


 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!