// Create a LinearLayout in which to add the ImageView
mLinearLayout = new LinearLayout(this);
// get the display metric (width and height)
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
final int width = metrics.widthPixels;
final int height = metrics.heightPixels;
final Bitmap lBmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);