当前位置:网站首页>Facebook open source shimmer effect

Facebook open source shimmer effect

2022-06-23 23:50:00 Android Guide

My introduction

Good morning , Sao Nian , I'm a small dish , My public number 「 Rookie turns over 」 Will recommend GitHub Useful projects on , A minute get An excellent open source project , Tap the value of open source , Welcome to follow me .

Today's recommendation is Facebook Open source flash effects :Shimmer, It's a Android library , It provides a way to Android Add flash effects to any view and text in the application , In actual development, it can be used in page loading indicator , Originally for Facebook Home Developed .

Results the preview

Instructions

app/build.gradle:

dependencies {
    
  implementation 'com.facebook.shimmer:shimmer:0.5.0'
}

Code calls :

<com.facebook.shimmer.ShimmerFrameLayout
     android:id="@+id/shimmer_view_container"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content">
    <!-- Your view -->
</com.facebook.shimmer.ShimmerFrameLayout>

ShimmerFrameLayout There are many custom attributes on the tag to control the appearance and speed of the effect , See GitHub Source code .

GitHub Address

https://github.com/facebook/shimmer-android

原网站

版权声明
本文为[Android Guide]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206232043467774.html