I have the following XML for an ImageView:
    <ImageView
        android:id="@+id/iv"
        android:layout_width="12dp"
        android:layout_height="12dp"
        android:src="@drawable/crossy"
        android:scaleType="fitXY" />
When I run the following code:
iv = (ImageView) findViewById(R.id.iv);
Log.i("IV WxH", ""+iv.getWidth() + " " + iv.getHeight());
LogCat shows the following:
02-05 23:56:04.116: I/IV WxH(10211): 24 24
How do I ensure the height and width stays the same in code as it is in XML?
 
     
    