I am trying to programmatically create a layer-list with resized bitmaps as items. From what I have seen BitmapDrawable has been deprecated. The new constructor requires the following parameters - public BitmapDrawable (Resources res, Bitmap bitmap). I have started out with a very basic example below.
BitmapDrawable background = new BitmapDrawable();
background.setBounds(10,10,10,10);
Drawable[] layers = {background};
LayerDrawable splash_test = new LayerDrawable(layers);
splash_test.setLayerInset(0, 0, 0, 0, 0);
How would I correctly use the new BitmapDrawable constructor and how do I link a drawable resource to the background object.