Welcome to JavaRanch Asif!
If you have your image resource in drawable folder you can refer them as follows:
android:background="@drawable/resource_name".
If you bundle them in
assets, then you will have to read these files as streams using
AssetManager and then create a
Bitmap from these stream using
BitmapFactory. After this is done, you can set this
Bitmap as background property of your
View or
ViewGroup in code.
Putting an image resource in drawable folder is NOT JUST copying an image file to a folder in the Project's structure.(Read official documentation on
Application Resources). Android tools(aapt et al.) do a lot of stuff behind the scenes.