I am attempting to create a layout where in portrait mode an image fits the screen. However, in landscape mode, I would like only the width to be stretched to the screen size and the height (of the image) to be scrolled. The ratio of width to height of the image shouldn't change.
My problem is that I never seem to be able to get a scroll bar and my image is always squished vertically.
This is my xml file:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/meep" >
</ScrollView>
How can I change this code so that my image keeps its aspect ratio and a vertical scrollbar appears?