you can use glide to download a bitmap and set it as a background from any layout.
Glide .with(getApplicationContext()) .load("https://www.google.es/images/srpr/logo11w.png") .asBitmap() .into(new SimpleTarget<Bitmap>(100,100) { @Override public void onResourceReady(Bitmap resource, GlideAnimation glideAnimation) { Drawable dr = new BitmapDrawable(resource); theLayout.setBackgroundDrawable(dr);
but itβs better to use imageView on top of relativelayout and make it match_parent and show the image on this image. this will help you directly use slide or picaso to load the image into the image without memory errors.
source share