Android Basics – Learn how to use Images in your App

If you want to use images in your Android App you will need to put them in the drawable folder under the res directory.

Like on my System the path is   /HelloAndroid/app/src/main/res/drawable

Android also gives you the option to put images for different screen densities.

For this you can create the following folders under drawable.

  • android-ldpi : Low Density Screens around 120dpi
  • android-mdpi : Medium – 160dpi
  • android-hdpi : High Density – 240dpi
  • android-xhdpi
  • android-xxhdpi
  • android-xxxhdpi

Source Code https://github.com/ankur-srivastava/HelloAndroid/blob/master/app/src/main/res/layout/ui_components.xml

Author: androidsmartly

I am a Tech Enthusiast who likes to work on new Ideas. Sharing knowledge on Android, Marketing, Startups and More.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s