Android Development to create Flash control effects

Source: Internet
Author: User

Drifting Android ($)

Copyright NOTICE: Welcome attention to public number: ytf0422 http://blog.csdn.net/ytfunnysite/article/details/77152513

method of Use;
Configuration Engineering
First, we clone the project locally on GitHub;
Https://github.com/facebook/shimmer-android
Next we import the required module in Android studio, i.e. shimmer-android;
Finally, you need to configure your own Gradle to reference the module:
dependencies {
Compile project (': Shimmer-android ')
}

XML layout file that will need to add special effects to the control with Shimmerframelayout package

       <!--Membership Level-<Com.facebook.shimmer.ShimmerFrameLayoutAndroid:id="@+id/shimmercontent"Android:layout_width="Wrap_content"android:layout_height="Wrap_content" ><ButtonAndroid:id="@+id/btn_huiyuanlevel"Android:layout_width="60DP"android:layout_height= "18DP" android:layout_marginleft=  "10DP" android:layout_margintop= "2DP" android:layout_torightof= "@id/huiyan_name" android:background= "@drawable/qingtonghuiyuanbg" android:gravity=" center "android:text=< Span class= "Hljs-value" > "bronze Member" android:textcolor= "#648728" android:textsize= "12sp"/> </ COM.FACEBOOK.SHIMMER.SHIMMERFRAMELAYOUT>        
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19

Setting the startup Glow Word configuration property in Java code

Shimmerframelayout shimmerframelayout = (shimmerframelayout) Findviewbyid (R. ID. shimmercontent); Shimmerframelayout. Setrepeatmode (Objectanimator. REVERSE); Shimmerframelayout. Setduration (1000); Shimmerframelayout. Setdropoff (0.4f) ;//set the width of the light shimmerframelayout.setbasealpha ((float) Span class= "Hljs-number" >0.9) ;//set the transparency of places without illumination//Shimmerframelayout.setintensity (6) ;//set the intensity of light//Set the shape of light, Linear Shimmerframelayout.setmaskshape (Shimmerframelayout.startshimmeranimation () Span class= "Hljs-comment",              
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • Previous ListView animate item (displacement, gradient, rotation, etc.)
    • Next Android Development bulk modify the specified string to remove excess red lines from the pasted copy code

Android Development to create Flash control effects

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.