java - 如何解决滚动视图中的图像视图滞后
问题描述
所有图像大小均小于 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>
解决方案
推荐阅读
- cmake - 有没有办法用 add_custom_target 将 add_custom_command 链接到另一个目录中定义的目标?
- ajax - 发送文件到 MVC 控制器
- c# - 如何隐藏主页/默认选项卡(TabControl)上的关闭按钮
- python - Python html格式全部选择表格行
- reactjs - 由于“导入类型”导致 testcafe 编译失败 - 需要更新到 Typescript 3.8 版
- javascript - 在 Chrome 中处理夏威夷键盘的 Unicode 转义序列
- java - 声明一个单独的变量然后引用它是否比设置对新变量的引用花费更多的空间?
- jquery - 从jquery中的两个不同数组以json格式绑定
- javascript - 为什么当我在嵌套的 for 循环中对该数组进行切片时,它会进入无限循环?
- android - Android Studio - 为不同用户保存 TextView 值