Skip to content

Instantly share code, notes, and snippets.

View realityexpander's full-sized avatar
🤓
Kotlin Multi-platoform, Android Native, iOS & Web

Chris Athanas realityexpander

🤓
Kotlin Multi-platoform, Android Native, iOS & Web
View GitHub Profile
@BracketCove
BracketCove / LoadingSpinner.kt
Created October 21, 2022 16:17
Easy animated loading spinner with Glide (or whatever image loading library)
//use this in your Recyclerview or whereever for asynchornous image loading
Glide.with(holder.itemView.context)
.load(avatarUrl)
.centerCrop()
.placeholder(
CircularProgressDrawable(holder.itemView.context).apply {
setColorSchemeColors(
ContextCompat.getColor(holder.itemView.context, R.color.colorPrimary)
)