Here is the code
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white" >
<ImageView
android:id="@+id/first_imageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:layout_marginTop="5dip"
android:src="@drawable/frame" />
<ImageView
android:id="@+id/second_imageview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/first_imageview"
android:layout_alignLeft="@id/first_imageview"
android:scaleType="fitXY" />
</RelativeLayout>
Now i need to detect the height & width of first_imageview and then set it to second_image_view. How to do it?
you can set
This will ensure that second image view has same size as first one.