Problem
I have a fragment that basically has a scrollview with an image view showed at full screen (look down for layout). If the image loaded for the ImageView is too tall (over 2000 pixel) the result is that the image view will show a blank page.
I am able to scroll down like if the image would be shown.
I started with the original image that is 720x2352 and then I tried cutting parts of the image. At 2000 height pixels the image is correctly shown.
The dimension of the phone where it needs to work is 720x1280.
Code
Layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"/>
</ScrollView>
<!-- other stuff -->
</LinearLayout>
Question
How can I preserve the height of the image without having the resulted image view to show a blank page?