Lags in multiple layouts RecyclerView
<p>I have the <code>RecyclerView</code> with 2 layouts. The first one describes main item and the second is <code>facebook</code> <code>native Ad</code>. It works, but every time the <code>position</code> with <code>NativeViewAd</code> is be shown on the display  - we can see micro-lags.</p>

<p><code>recycler_item.xml</code></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="250dp"
android:orientation="vertical"
android:padding="8dp"
android:id="@+id/list_item"&gt;

&lt;LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"&gt;

    &lt;ImageView
        android:id="@+id/food_picture"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:adjustViewBounds="true"
        android:src="@drawable/blank2" /&gt;


&lt;/LinearLayout&gt;

&lt;LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"&gt;
    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"&gt;
        &lt;TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/test_name_food"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="#242424"
            android:paddingTop="4dp" /&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingLeft="8dp"
        android:paddingBottom="8dp"
        android:paddingRight="8dp"
        android:paddingTop="4dp"&gt;
        &lt;TextView
            android:id="@+id/ingr_count"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/test_name_ingr"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_weight="1"
            android:textAlignment="center"
            android:layout_gravity="center_vertical"
            android:gravity="center" /&gt;
        &lt;!--
                &lt;LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:layout_weight="33"&gt;

                    &lt;ImageView
                        android:id="@+id/ic_ingredient"
                        android:layout_width="24dp"
                        android:layout_height="24dp"
                        android:src="@drawable/ic_ingredient"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="1"
                        android:paddingRight="8dp" /&gt;
                    &lt;ImageView
                        android:id="@+id/ic_time"
                        android:layout_width="24dp"
                        android:layout_height="24dp"
                        android:src="@drawable/ic_time"
                        android:layout_gravity="center_vertical|right"
                        android:layout_weight="1"
                        android:paddingLeft="8dp" /&gt;
        &lt;/LinearLayout&gt;
        --&gt;



        &lt;TextView
            android:id="@+id/look"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="Просмотреть"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_gravity="center"
            android:textAlignment="center"
            android:gravity="center"
            android:textColor="#4CAF50"
            android:textStyle="bold"
            android:typeface="normal"
            android:layout_weight="1" /&gt;

    &lt;/LinearLayout&gt;


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

<p></p>

<p>and <code>additional.xml</code></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="300dp"
android:orientation="vertical"
android:id="@+id/ad_test2"
android:background="@drawable/blank2"&gt;

&lt;ImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/blank2"
    android:id="@+id/blank_holder"/&gt;
</code></pre>

<p></p>

<p>Here's a gist of <code>RecyclerAdapter.class</code> <a href="https://gist.github.com/burnix/d0b32f0dc4b525ec3aa7" rel="nofollow">https://gist.github.com/burnix/d0b32f0dc4b525ec3aa7</a> if you need, but I suppose, that there is a problem in the one of <code>layouts</code>.</p>

<p>So how can I solve my issue? </p>

<p>P.S. If <code>layouts</code> even have the same <code>height</code>,  lags don't  disappear.</p>