I have an image(320×210), I call the image from drawable folder in xml file…in portrait mode its working fine, but while I change the device to LANDSCAPE the image is not fitting prorerly..?? How to resolve that issue..??
Here is my xml code i tried
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitCenter"(here i tried with "fitXY" also)
android:adjustViewBounds="true"
android:src="@drawable/srkpic"/>
And also i tried with this method
protected void onSizeChanged(int w, int h, int oldW, int oldH)
{
}
but this method is available only if we extends with “View” which is not meet my requirement.
Thanks.
use the code below on change of your orientation, where imgHeaderFooter is your bitmap