android viewpager lags with image
<p>I have an intro with 3 pages.
I use this tutorial, to realize an swipe page intro:
<a href="https://thepseudocoder.wordpress.com/2011/10/05/android-page-swiping-using-viewpager/" rel="nofollow noreferrer">https://thepseudocoder.wordpress.com/2011/10/05/android-page-swiping-using-viewpager/</a></p>

<p>This works fine, BUT:</p>

<p>My first page have an image and a text. My second and third page have only text without an image.</p>

<p>If I swipe from page 1 to page 2 or back from 2 to 1, the slide animation will lag.</p>

<p>Now I found a "solution"
if I remove my image from page 1 = no lag
with image = lag</p>

<p>My first page looks like this:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;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"&gt;


    &lt;TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/txt"
        android:id="@+id/txt" /&gt;

    &lt;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" /&gt;

&lt;/RelativeLayout&gt;
</code></pre>