I have an imageview. I want its width to be fill_parent. I want its height to be whatever the width ends up being. For example:
The ImageView "scaleType" function may help you here.
This code will keep the aspect ratio and position the image at the top:
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitStart"
Here is a great post showing the possibilities and appearances from using scaleType.
ImageView scaleType samples