I have the following android layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainTopLevel"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id="@+id/orbitImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:scaleType="fitStart"
android:src="@drawable/earthorbit"
android:padding="0dp"
android:background="@android:color/white"
/>
<TextView
android:id="@+id/positionDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="40dp"
android:layout_below="@id/orbitImage"
android:text="should appear below image"
/>
</RelativeLayout>
The image scales down quite a bit, but since the aspect ratio is maintained, it only takes up the top half of the screen.
The problem is that the image view itself has the original height, which takes the entire screen and the text never shows up.
(So the original image is about 620 X 430, the scaled image is about 250 X 200, but the image view is about 250 X 430)
Is there a way to get the size of the image view to exactly match the scaled size of the image?