0
我有一个3页的介绍。 我使用本教程,以实现刷卡页面简介: https://thepseudocoder.wordpress.com/2011/10/05/android-page-swiping-using-viewpager/android viewpager与图像不匹配
这工作正常,但:
我的第一页有一个图像和文本。我的第二和第三页只有文字没有图像。
如果我从页面1滑动到页面2或从2滑动到1,幻灯片动画将会滞后。
现在,我发现了一个“解决方案” 如果我从网页中删除图片1 =没有滞后 与图像=滞后
我的第一个网页看起来是这样的:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/Page1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/txt"
android:id="@+id/txt" />
<ImageView
android:id="@+id/imageView3"
android:layout_gravity="center"
android:background="@drawable/image"
android:layout_width="183dp"
android:layout_height="281dp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
你的图像大小是多少? – Gauthier
原始尺寸:640 x 987 px – Stack108
现在呢? :( – Stack108