title: Using custom LinearLayoutManager
body: <p>I tried to use this custom LinearLayoutManager (for using wrap content on my RecyclerView) :</p>
  
  <p><a href="https://github.com/serso/android-linear-layout-manager" rel="nofollow">https://github.com/serso/android-linear-layout-manager</a></p>
  
  <p>Also, when I compiled, my app crash and I have this error :</p>
  
  <p>java.lang.NoSuchMethodError: android.support.v7.widget.RecyclerView$LayoutParams.getViewLayoutPosition</p>
  
  <p>This is my XML :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:custom="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:weightSum="10"
      android:orientation="vertical"
      android:background="@color/hypred_noir"&gt;
          &lt;RelativeLayout
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="4.5"
              android:background="@color/hypred_rouge"
              android:layout_gravity="center_vertical"&gt;
              &lt;android.support.v7.widget.RecyclerView
                  android:id="@+id/critere_rep_recycler_view_un"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:scrollbarStyle="insideOverlay"
                  android:overScrollMode="never"
                  android:layout_centerInParent="true"&gt;
              &lt;/android.support.v7.widget.RecyclerView&gt;
          &lt;/RelativeLayout&gt;
          &lt;RelativeLayout
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"&gt;
              &lt;View
                  android:layout_width="match_parent"
                  android:layout_height="0.5dp"
                  android:layout_centerVertical="true"
                  android:background="@color/hypred_grey"
                  android:layout_centerInParent="true"/&gt;
              &lt;com.ylly.hypred.custom.MyTextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_centerInParent="true"
                  custom:font_name="Arial-Bold.ttf"
                  android:background="@color/hypred_blanc"
                  android:textColor="@color/hypred_gris"
                  android:paddingRight="1dp"
                  android:paddingLeft="1dp"
                  android:text="@string/ou"/&gt;
          &lt;/RelativeLayout&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="4.5"&gt;
          &lt;android.support.v7.widget.RecyclerView
              android:id="@+id/critere_rep_recycler_view_deux"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:scrollbarStyle="insideOverlay"
              android:overScrollMode="never"
              android:layout_centerInParent="true"&gt;
          &lt;/android.support.v7.widget.RecyclerView&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And my code :</p>
  
  <pre><code>RecyclerView recyclerViewCritere = (RecyclerView) v.findViewById(R.id.critere_rep_recycler_view_un);
  LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
  recyclerViewCritere.setLayoutManager(linearLayoutManager);
  recyclerViewCritere.addItemDecoration(new DividerItemDecoration(context, null));
  
  Drawable drawable1 = context.getResources().getDrawable(R.drawable.hypred_critere_decolmatage);
  Drawable drawable2 = context.getResources().getDrawable(R.drawable.hypred_critere_fouling_test);
  Drawable drawable3 = context.getResources().getDrawable(R.drawable.hypred_critere_biofilm_solutions);
  Drawable drawable4 = context.getResources().getDrawable(R.drawable.hypred_critere_eau);
  Drawable drawable5 = context.getResources().getDrawable(R.drawable.hypred_critere_approche_audit_hypred);
  Drawable drawable6 = context.getResources().getDrawable(R.drawable.hypred_critere_suivi_intallation);
  
  ItemDataCritere itemDataCritere[] = {new ItemDataCritere("Décolmatage", drawable1),
          new ItemDataCritere("Fouling Test", drawable2), new ItemDataCritere("BioFilm Solutions", drawable3),
          new ItemDataCritere("L'Eau", drawable4), new ItemDataCritere("Approche Audit HYPRED", drawable5),
          new ItemDataCritere("Suivi Installation", drawable6)};
  
  recyclerViewCritere.setAdapter(new MyCritereAdapter(itemDataCritere));
  </code></pre>
  
  <p>Thanks in advance and have a good day :o)</p>