Adding Image to App


It is assumed that you have gone through Android Hello world! and you know how to create a sample App on your device already.

This page shows you how to add resource (image) to your Android App.

(start) Android Studio >> (create) New Project >> (choose) Empty Activity

Empty Main Activity Screen

Resource Manager Tab (Left Side Window) >> Drawable >> ” +” sign (Add Resource to the module).

Resource Manager Screen

Choose Import Drawables

Choose Density of Image.

Resource Added Screen
Here, image  resource is only imported to your project from external file system. It is yet to be added into your App.

Layout >> Double Click on activity_main

Layout – Activity Main Screen

The imported Image Resource is now added to the layout "BUT!!" it is not aligned yet. Image has 4 edges. Pick each edge of image using mouse and drag till end of layout screen. Repeat for each edge. This will make your image dockable anywhere on layout.

Congratulations! Your image resource is now added on your app running on your mobile device.