-
-
Notifications
You must be signed in to change notification settings - Fork 1
ThirdPartyUtils
Jacob Rein edited this page May 27, 2020
·
1 revision
implementation 'com.github.jakepurple13.HelpfulTools:thirdpartyutils:{version}'
These are some ThirdParty Utils that I use every now and then when I use the libraries.
//Easy way to change the tint
com.airbnb.lottie.LottieAnimationView.changeTint(android.graphics.Color.BLUE)
//Easy ways to check if the view's progress is 1f or 0f
com.airbnb.lottie.LottieAnimationView.checked = true
if(com.airbnb.lottie.LottieAnimationView.checked) println("Its true!")
//will automatically animate the view from currentProgress-1f if true or currentProgress-0f if false
com.airbnb.lottie.LottieAnimationView.check(true)
//Get the palette from any drawable easily
android.graphics.drawable.Drawable.getPalette()
//An easy to
Glide.with(context)
.asBitmap() //Whatever this is
.load(url)
.into<Bitmap> { //this has to match
loadCleared { } //You don't need to put this one in
resourceReady { image, _ -> println("Image is a bitmap!") }
}