I\'m trying to set my root LinearLayout element (which is set to fill_parent in both dimensions) to have a background image which is always located in the lower left corner
My answer is just an update of above answers If you are using XML for background, it may occur problem in aspect ratio
so use this code
Bitmap bmp = BitmapFactory.decodeResource(getResources(),
R.drawable.image);
BitmapDrawable bitmapDrawable = new BitmapDrawable(bmp);
bitmapDrawable.setGravity(Gravity.BOTTOM| Gravity.RIGHT| Gravity.FILL_HORIZONTAL);
LinearLayout layout = (LinearLayout) findViewById(R.id.background_root);
layout.setBackgroundDrawable(bitmapDrawable);
Gravity.Fill_HORIZONTAL will fit with width of layout on which you are applying background you can also mention this in XML file but as i said it will occur issue of Image Ratio