Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package com.arcane.coldstorageexamples.activity
import android.os.Bundle
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import com.arcane.coldstorageannotation.LoadImage
import com.arcane.coldstoragecache.cache.Cache
import com.arcane.coldstorageexamples.R
class LoadImageExampleActivity : AppCompatActivity() {
@LoadImage(
R.id.image_1,
"https://image.shutterstock.com/image-photo/small-red-bunny-on-isolated-260nw-562790971.jpg",
placeHolder = R.drawable.loading, enableLoadingAnimation = true
)
lateinit var imageWithAnimation: ImageView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.load_image_example)
Cache.bind(this)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment