首页 > 解决方案 > 如何解决滚动视图中的图像视图滞后

问题描述

所有图像大小均小于 150kb。我知道是分辨率问题,但是如何在不更改分辨率的情况下解决它?所有图像都有不同的分辨率。最大的是1800*1200像素,最小的是1109*614像素。我已经尝试在这里找到答案。但它不起作用。

这是输出接口。

这是我的源代码。我把它剪短了,因为系统不允许我用更长的代码发布它。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top"
android:orientation="vertical"
>

<ScrollView

    android:fillViewport="true"
    android:id="@+id/scrollView1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <LinearLayout

        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="top"
        android:orientation="vertical"
       >

       <FrameLayout

            android:layout_width="match_parent"
            android:layout_height="wrap_content">



            <ImageView

                android:src="@drawable/back" />

            <TextView


                android:fontFamily="@font/im_fell_dw_pica_sc"/>

        </FrameLayout>

        <FrameLayout

            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView

                android:src="@drawable/abs3" />


            <TextView

                android:fontFamily="@font/im_fell_dw_pica_sc"/>

        </FrameLayout>

        <FrameLayout

            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView

                android:src="@drawable/leg" />


            <TextView
              />

        </FrameLayout>

        <FrameLayout

            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView

                android:src="@drawable/chest"
                />


            <TextView
               />

        </FrameLayout>


    </LinearLayout>
</ScrollView>

标签: javaandroidandroid-studio

解决方案


推荐阅读