I have been using a shapeDrawable object for my android games player but now that i want to add some graphics in I have to use something different I was thinking of a BitmapDrawable but as I am new to this I have no idea how to initialize these sorts of classes, or how to get the image from the game resources could anyone put me on the right track or point me to some helpful tutorials.
This is how you create a bitmap from a resource id :
To create a BitmapDrawable from a bitmap :
Be aware that, depending on the kind of game you are making, you might want to use the NDK and an opengl game engine like Cocos2d-x for example ( http://www.cocos2d-x.org/ ).
The Android SDK has not been designed for game, or maybe for simple games like crosswords, or sudoku, with not too much graphics fx. The powerful Android layout system on is designed to build a GUI for different screen sizes, but it's requiring too much CPU for most of the game.
I remember starting making a game for iOS 3 years ago with the UIKit library (equivalent of Android SDK/Layouts on iOS). The game was working fine but I was stuck with low performances, unresponsive touch screen, and it was impossible to add more on the rendering pipeline (like particles fx). I rewrote completely the game with Cocos2d, and that was so much better/smooth.