try:
put it before setContentView (layoutId) in your first activity.
getWindow().setFormat(PixelFormat.RGBA_8888);
and after calling setContentView (layoutId) in your first action, you added the following code:
BitmapFactory.Options options = new BitmapFactory.Options(); options.inPreferredConfig = Bitmap.Config.ARGB_8888; options.inDither = true; options.inScaled = false; options.inDither = false; options.inPurgeable = true; Bitmap preparedBitmap = BitmapFactory.decodeResource(yourAppName.getSharedApplication().getResources(), R.drawable.bg, options); Drawable background = new BitmapDrawable(preparedBitmap); ((LinearLayout) findViewById(R.id.yourLayoutId)) .setBackgroundDrawable(background);
and finnaly, you put your xml images in res / drawable "if you have xml images", as well as png, jpeg and other normal images that you put in the res / drawable-hdpi folder.
Hope this helps.
source share