title: Coordinator layout with viewpager with recyclerview as adapter
body: <p>I have this layout with coordinator layout, that has tabs with viewpager and in viewpager adapter I create recyclerview for each page. </p>
  
  <p>Layout : </p>
  
  <pre><code>08-09 11:28:17.816    2804-2804/com.xxx.yyy.debug     E/AndroidRuntime﹕ FATAL EXCEPTION: main
  java.lang.IllegalArgumentException: width and height must be &gt; 0
          at android.graphics.Bitmap.createBitmap(Bitmap.java:638)
          at android.graphics.Bitmap.createBitmap(Bitmap.java:620)
          at android.support.design.widget.CollapsingTextHelper.ensureExpandedTexture(CollapsingTextHelper.java:413)
          at android.support.design.widget.CollapsingTextHelper.setInterpolatedTextSize(CollapsingTextHelper.java:390)
          at android.support.design.widget.CollapsingTextHelper.calculateOffsets(CollapsingTextHelper.java:227)
          at android.support.design.widget.CollapsingTextHelper.setExpansionFraction(CollapsingTextHelper.java:203)
          at android.support.design.widget.CollapsingToolbarLayout$OffsetUpdateListener.onOffsetChanged(CollapsingToolbarLayout.java:768)
          at android.support.design.widget.AppBarLayout$Behavior.dispatchOffsetUpdates(AppBarLayout.java:853)
          at android.support.design.widget.AppBarLayout$Behavior.setAppBarTopBottomOffset(AppBarLayout.java:836)
          at android.support.design.widget.AppBarLayout$Behavior.scroll(AppBarLayout.java:795)
          at android.support.design.widget.AppBarLayout$Behavior.onNestedPreScroll(AppBarLayout.java:635)
          at android.support.design.widget.AppBarLayout$Behavior.onNestedPreScroll(AppBarLayout.java:583)
          at android.support.design.widget.CoordinatorLayout.onNestedPreScroll(CoordinatorLayout.java:1477)
          at android.support.v4.view.ViewParentCompat$ViewParentCompatStubImpl.onNestedPreScroll(ViewParentCompat.java:106)
          at android.support.v4.view.ViewParentCompat.onNestedPreScroll(ViewParentCompat.java:355)
          at android.support.v4.view.NestedScrollingChildHelper.dispatchNestedPreScroll(NestedScrollingChildHelper.java:208)
          at android.support.v7.widget.RecyclerView.dispatchNestedPreScroll(RecyclerView.java:8376)
          at android.support.v7.widget.RecyclerView.onTouchEvent(RecyclerView.java:2191)
          at android.view.View.dispatchTouchEvent(View.java:7205)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2231)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1964)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979)
          at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237)
          at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979)
          at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2151)
          at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1480)
          at android.app.Activity.dispatchTouchEvent(Activity.java:2435)
          at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:59)
          at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:59)
          at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2099)
          at android.view.View.dispatchPointerEvent(View.java:7385)
          at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3398
  </code></pre>
  
  <p>Here are the layouts : </p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;android.support.v4.widget.DrawerLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          android:id="@+id/drawer"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@color/turquoise_blue"
          tools:context=".MainActivity"&gt;
  
      &lt;include
              layout="@layout/profile_content" /&gt;
  
      &lt;include
              layout="@layout/drawer_menu" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>and the profile content layout : </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ui.screen.ProfileView
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
      &lt;android.support.design.widget.CoordinatorLayout
              android:id="@+id/content"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"&gt;
  
          &lt;android.support.v4.view.ViewPager
                  android:id="@+id/profile_viewpager"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
          &lt;android.support.design.widget.AppBarLayout
                  android:id="@+id/profile_appbar_layout"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="@android:color/transparent"
                  app:elevation="2dp"
                  &gt;
  
              &lt;android.support.design.widget.CollapsingToolbarLayout
                      android:id="@+id/collapsing_toolbar"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      app:contentScrim="?attr/colorPrimary"
                      app:layout_scrollFlags="scroll|exitUntilCollapsed"
                      app:expandedTitleTextAppearance="@android:color/transparent"
                      app:elevation="2dp"&gt;
  
                  &lt;LinearLayout
                          android:id="@+id/profile_user_layout"
                          android:layout_width="match_parent"
                          android:layout_height="192dp"
                          android:background="?attr/colorPrimary"
                          android:clipChildren="false"
                          android:clipToPadding="false"
                          android:orientation="vertical"
                          android:paddingBottom="24dp"
                          android:paddingLeft="24dp"
                          android:paddingRight="24dp"
                          android:paddingTop="64dp"
                          app:layout_collapseMode="parallax"&gt;
  
                      &lt;LinearLayout
                              android:layout_width="match_parent"
                              android:layout_height="wrap_content"
                              android:clipChildren="false"
                              android:orientation="horizontal"&gt;
  
                          &lt;FrameLayout
                                  android:layout_width="96dp"
                                  android:layout_height="96dp"
                                  android:clipChildren="false"&gt;
  
                              &lt;de.hdodenhof.circleimageview.CircleImageView
                                      android:id="@+id/profile_user_photo"
                                      android:layout_width="86dp"
                                      android:layout_height="86dp"
                                      android:src="@mipmap/ic_launcher"
                                      app:border_width="1dp"
                                      app:border_color="@color/white"/&gt;
  
                              &lt;View
                                      android:id="@+id/profile_user_medal"
                                      android:layout_width="24dp"
                                      android:layout_height="24dp"
                                      android:background="@drawable/medal"
                                      android:layout_marginRight="6dp"
                                      android:layout_marginTop="2dp"
                                      android:layout_gravity="top|right"/&gt;
  
                          &lt;/FrameLayout&gt;
  
                          &lt;LinearLayout
                                  android:id="@+id/profile_user_details"
                                  android:layout_width="wrap_content"
                                  android:layout_height="wrap_content"
                                  android:layout_weight="1"
                                  android:orientation="vertical"
                                  android:layout_marginLeft="16dp"&gt;
  
                              &lt;TextView
                                      android:id="@+id/profile_user_name"
                                      android:layout_width="match_parent"
                                      android:layout_height="wrap_content"
                                      android:text="Kateřina Bíla"
                                      android:textColor="@color/white"
                                      android:textSize="24sp"/&gt;
  
                              &lt;TextView
                                      android:id="@+id/profile_user_completed_activities"
                                      android:layout_width="match_parent"
                                      android:layout_height="wrap_content"
                                      android:text="Dokoncene 4 z 5"
                                      android:textColor="@color/white"
                                      android:textSize="16sp"/&gt;
  
                              &lt;LinearLayout
                                      android:layout_width="match_parent"
                                      android:layout_height="wrap_content"
                                      android:orientation="horizontal"&gt;
  
                                  &lt;TextView
                                          android:id="@+id/profile_user_progress_text"
                                          android:layout_width="wrap_content"
                                          android:layout_height="wrap_content"
                                          android:textSize="20sp"
                                          android:textColor="@color/white"
                                          android:text="50%"/&gt;
  
                                  &lt;com.rey.material.widget.ProgressView
                                          android:id="@+id/profile_user_progress_bar"
                                          android:layout_width="match_parent"
                                          android:layout_height="6dp"
                                          android:visibility="visible"
                                          android:layout_gravity="center_vertical"
                                          android:layout_marginLeft="8dp"
                                          android:paddingRight="16dp"
                                          app:pv_progressMode="determinate"
                                          app:pv_circular="false"
                                          app:pv_autostart="true"
                                          app:lpd_strokeSize="3dp"
                                          app:lpd_strokeColor="@color/red"
                                          app:lpd_strokeSecondaryColor="@color/white"
                                          app:lpd_maxLineWidth="62dp"
                                          app:lpd_minLineWidth="31dp"
                                          app:pv_progressStyle="@style/ProfileTotalProgressBar"
                                          app:pv_progress="0.5"/&gt;
  
  
                              &lt;/LinearLayout&gt;
  
  
                          &lt;/LinearLayout&gt;
                      &lt;/LinearLayout&gt;
  
  
                  &lt;/LinearLayout&gt;
  
                  &lt;include
                      layout="@layout/toolbar" /&gt;
  
              &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
  
              &lt;FrameLayout
                      android:layout_width="match_parent"
                      android:layout_height="48dp"&gt;
  
                  &lt;android.support.design.widget.TabLayout
                          android:id="@+id/profile_tab_layout"
                          android:layout_width="match_parent"
                          android:layout_height="48dp"
                          android:layout_gravity="top"
                          android:background="?attr/colorPrimary"
                          app:tabTextColor="@color/white_87"
                          app:tabGravity="fill"
                          app:tabIndicatorColor="@color/white"
                          app:tabIndicatorHeight="4dp"
                          app:tabMode="fixed"
                          app:tabSelectedTextColor="@color/white"
                          app:tabTextAppearance="@style/TabTextAppearance"
                  /&gt;
  
              &lt;/FrameLayout&gt;
  
          &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;/android.support.design.widget.CoordinatorLayout&gt;
  
  &lt;/ui.screen.ProfileView&gt;
  </code></pre>
  
  <p>The thing is this only happens on Samsung S3 mini. I tried more devices like Nexus 5, Samsung Galaxy S6, some older HTC devices, but only on the mini I get this error while trying to scroll up with recyclerview. I don't get the bitmap error. </p>
  
  <p>Edit: I made some more research, this problem seems to be affecting all devices on API lower than KitKat. </p>