How to implement preloading

I did the caching part, but I’m not able to think of a way to preload images. Any suggestions?

Here is the caching part:

val maxMemory = (Runtime.getRuntime().maxMemory() / 1024).toInt()
    val cache = object: LruCache<String, Bitmap>(maxMemory) {
        override fun sizeOf(key: String, value: Bitmap): Int {
            return value.byteCount
        }
    }
    lateinit var bitmap: Bitmap

    if (cache.get(url) != null){
        bitmap = cache.get(url)
    }else{
        bitmap = flickrFetchr.fetchPhoto(url) ?: return
        cache.put(url,bitmap)
    }

I create a project, it shows me a virtual device with some apps but it does not show me the app I have created https://9apps.ooo/download/