08/12/2023

Fabrikant Tech

Tech Specialists

The Android Arsenal – Animations

The Android Arsenal – Animations

A basic library to present a loader around the edges of a materail chip

Utilization

place in root create.gradle

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

in module make.gradle

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

Just place in your layout file

      

by deault a purple loading line will exhibit up , you can personalize with subsequent characteristics

attribute format desciption
loaderColor color give a ideal color to loader line
loaderWidth dimension give desired with to loading line
lapDuration integer give wanted duration in millis for a entire rotation of loader line close to the chip
loadOnClick boolean implies regardless of whether or not you want to start the laoder on the simply click of the chip , defaut benefit is correct
loaderColorStart/loaderColorEnd colour these attributes falls in one column due to the fact there influence is only obvious if equally of them are present they are utilized to draw loading line in a gradient coloration , where loaderColorStart offers the start out shade and loaderColorEnd provides the end colour of the gradient , when these characteristics are current loaderColor characteristics is overlooked if current , if only a person of them is existing loaderColor is applied.
reverseEffect boolean signifies whether or not or not loader ought to go again and forth
loadingText String optional textual content to clearly show though loading
loadingTextColor color textual content color to clearly show when loading
loaderStyle enum use to provide a loading style doable values bounce , speed up , decelerate , accelerateThenDecelerate(default) , linear , overshoot , fastOutSlowIn

Default Loader

Gradient Loader (Use both loaderColorStart and loaderColorEnd attributes for gradient loader of those two colours)

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 previously mentioned Screen

    

    

   

     


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

give optional textual content whilte loading , characteristics loadingText , loadingTextColor are additional

Contributions thanks to cheticamp from stackoverflow for repairing this main bug.