How To Add Icons Dynamically In Android?

Here I need to add the icons dynamically for each screens from URL in android. I won't add any icons in drawable folders. Because here the reason is complete dynamic screens(Customization for screen will be done through admin panel).

Basic requirement:

  • Simply dynamic application that can be configured from web Admin.
  • Each view creation is decided from web admin.

The possible ways are,

  1. Can download the images from URL and store it to local database (SQLite)
  2. Can download the images from URL and store it to file path (Internal storage)

But, I think this won't work for all screens because of different screen sizes. Is there any possibilities other than these two points? Kindly let me know if any possible ways.

Thanks in Advance!



Finally I got the best solution for storing dynamic images from server and retrieve the images for their corresponding screens.

  • Downloaded the required images as SVG and stored it in file storage.

  • By using this library svg-android-1.1.jar I have converted the SVG images to drawable. Then simply added these to ImageView.