18/06/2024

Tech Guru

Trusted Source Technology

The Android Arsenal – Animations

The Android Arsenal – Animations

A uncomplicated library to display a loader all around the edges of a materail chip

Utilization

put in root establish.gradle

                   allprojects 
                         repositories 
                             ...
                         maven  url 'https://jitpack.io' 
                    
                    

in module construct.gradle

           implementation 'com.github.AbhinavChauhan97:LoaderChip:1..4'

Merely place in your structure file

      

by deault a purple loading line will show up , you can customise with adhering to attributes

attribute structure desciption
loaderColor color give a ideal shade to loader line
loaderWidth dimension give desired with to loading line
lapDuration integer give wished-for period in millis for a complete rotation of loader line about the chip
loadOnClick boolean suggests whether or not you want to commence the laoder on the click on of the chip , defaut worth is legitimate
loaderColorStart/loaderColorEnd color these attributes falls in one particular column mainly because there outcome is only visible if both equally of them are present they are utilised to draw loading line in a gradient colour , wherever loaderColorStart gives the start off colour and loaderColorEnd presents the finish color of the gradient , when these characteristics are present loaderColor attributes is overlooked if present , if only just one of them is current loaderColor is utilised.
reverseEffect boolean indicates no matter whether or not loader should really go back and forth
loadingText String optional textual content to present though loading
loadingTextColor colour text color to present while loading
loaderStyle enum use to provide a loading type possible values bounce , speed up , decelerate , accelerateThenDecelerate(default) , linear , overshoot , fastOutSlowIn

Default Loader

Gradient Loader (Use both loaderColorStart and loaderColorEnd attributes for gradient loader of people two shades)

Loader with width = 4dp and lapduration = 4000 milliseconds

Loader with overshoot loaderStyle

Loader with bounce loaderStyle

Loaders with reverseEffect enabled and with vairous corner radius

xml file of over Screen

    

    

   

     


Version 1..5 ( 10-july-2021)

give optional textual content whilte loading , attributes loadingText , loadingTextColor are included

Contributions many thanks to cheticamp from stackoverflow for correcting this major bug.