I have an image in my application. But size of the image becomes larger for smaller screens. So I tried by adding scroll view for the image.
Code:
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scrollbarFadeDuration="10"
android:scrollbarAlwaysDrawHorizontalTrack="true"
android:scrollbarAlwaysDrawVerticalTrack="true" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="400dp"
android:layout_height="500dp"
android:contentDescription="@string/image"
android:layout_marginLeft="160dp"
android:scrollbarThumbHorizontal="@id/imageView1"
android:scrollbarThumbVertical="@id/imageView1"
android:src="@drawable/abc" />
</ScrollView>
But this allows me to scroll in vertical direction only. Help me what do so that I can scroll the image in horizontal direction also.