这我使用的代码:
<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>
现在我需要检测first_imageview的高和宽,然后把这些高和宽给second_image_view设置。如何实现这个功能?