0

I have image view inside scroll view. ImageView must scroll. Image resolution 1278x4987 (png) Here is my code:

 <ScrollView          
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <ImageView                   
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:scaleType="fitStart"
                android:src="@drawable/image_test" />

        </LinearLayout>
    </ScrollView>

In my log:

Bitmap too large to be uploaded into a texture (1923x7500, max=4096x4096)

But my image view not showing on some devices. Image size is not large. What could be causing this? Help me please

Android
  • 239
  • 1
  • 4
  • 12
  • If your image "image_test" is a vector type, try by using app:srcCompat="@drawable/image_test" instead of android:src="@drawable/image_test" – akashzincle Apr 10 '20 at 17:48
  • you need to have different densities of your image in various drawable folders under `/res`; devices with lower densities won't show the image; you can check [this](https://stackoverflow.com/questions/60251167/where-to-store-images-in-android/60310540#60310540) for more illustration – Zain Apr 10 '20 at 19:39

0 Answers0