I am trying to get the height & width of ImageView bot it's returning 0
public class FullScreenImage extends FragmentActivity {
ImageView full_view;
int width;
int height;
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
setContentView(R.layout.full_screen);
full_view = (ImageView)findViewById(R.id.full_view);
Bundle bundle=getIntent().getExtras();
byte[] image= bundle.getByteArray("image");
width = full_view.getWidth();
height = full_view.getHeight();
Bitmap theImage = BitmapFactory.decodeByteArray(image, 0, image.length);
Bitmap resized = Bitmap.createScaledBitmap(theImage,width , height, true);
full_view.setImageBitmap(resized);
}
}
Please help me, how to find it from ImageView?