title: Recyclerview adapter methods not called after updating compilesdkversion to 27
body: <p>I have an existing adapter class which have android.support.v7.widget.RecyclerView and android.support.design.widget.AppBarLayout inside a android.support.design.widget.CoordinatorLayout parent. See below.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:background="@color/background_grey"
  style="@style/layoutParent"&gt;
  
  
  &lt;android.support.design.widget.AppBarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:fitsSystemWindows="true"
      android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/bg_red_blue_gradient"
          android:gravity="center"
          android:orientation="vertical"
          android:paddingLeft="@dimen/_8sdp"
          android:paddingStart="@dimen/_8sdp"
          android:paddingRight="@dimen/_8sdp"
          android:paddingEnd="@dimen/_8sdp"
          app:layout_collapseMode="none"
          app:layout_scrollFlags="scroll|enterAlwaysCollapsed"&gt;
  
          &lt;com.android.somecustomlayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content" /&gt;
  
      &lt;/LinearLayout&gt;
  
  
      &lt;com.android.someothercustomlayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content" /&gt;
  
  &lt;/android.support.design.widget.AppBarLayout&gt;
  
  
  &lt;android.support.v7.widget.RecyclerView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_marginTop="@dimen/_5sdp"
      android:layout_marginLeft="@dimen/_5sdp"
      android:layout_marginStart="@dimen/_5sdp"
      android:layout_marginRight="@dimen/_5sdp"
      android:layout_marginEnd="@dimen/_5sdp"
      android:layout_marginBottom="?attr/actionBarSize"
      app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p>This is the code of adapter class</p>
  
  <pre><code>public class ABC extends RecyclerView.Adapter&lt;RecyclerView.ViewHolder&gt; {
  
  private ArrayList&lt;ResultModel&gt; mResultModel;
  private Context mContext;
  
  public ABC (Context context, ArrayList&lt;ResultModel&gt; resultModel) {
      mContext = context;
      this.mResultModel = resultModel;
  
       mParams = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
  }
  
  
  @Override
  public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View headerView = LayoutInflater.from(parent.getContext()).inflate(R.layout.abc, parent, false);
      return new RowItemViewHolder(headerView);
  }
  
  @Override
  public void onBindViewHolder(final RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") int position) {
  
      RowItemViewHolder rowItemViewHolder = (RowItemViewHolder) holder;
  
  rowItemViewHolder.textview.settext(mResultModel.get(position).mName.get(0));
   //   computations and logic for views
  
  
  }
  
  @Override
  public int getItemCount() {
      if (null != ResultModel) {
          return mResultModel.size();
      } else {
          return 0;
      }
  }
  
  
  
  }
  
  
  @Override
  public void onViewDetachedFromWindow(RecyclerView.ViewHolder holder) {
      super.onViewDetachedFromWindow(holder);
      holder.itemView.clearAnimation();
  }
  
  
  
  private static class RowItemViewHolder extends RecyclerView.ViewHolder {
  
      private textview textview1;
  .....
  
      RowItemViewHolder(View itemView) {
          super(itemView);
  
  textview = (textview) itemView.findViewById(R.id.some_id_here);
  
  }
  
  
  /**
   * Method help to set listener on {@link ResultRowItemListener}
   *
   * @param itemListener instance of {@link ResultRowItemListener}
   */
  public void setResultRowItemListener(ResultRowItemListener itemListener) {
      mRowItemClickListener = itemListener;
  }
  
  /**
   * Listener that provide method on row item click
   */
  public interface FlightSearchResultRowItemListener {
      void onResultRowItemClick(ResultModel ResultModel, int position);
  }
  }
  </code></pre>
  
  <p>Everything was working fine until I updated compileSdkVersion from 23 to 27. Also i updated buildToolsVersion, com.android.support:appcompat-v7, com.android.support:support-v4, com.android.support:design, com.android.support:cardview-v7,com.android.support:recyclerview-v7 to 27.1.1.</p>
  
  <p>See the build.gradle below</p>
  
  <pre><code> apply plugin: 'com.android.library'
  
  repositories {
  maven { url 'http://repo1.maven.org/maven2' }
  jcenter { //noinspection GroovyAssignabilityCheck
      url 'http://jcenter.bintray.com/' }
  }
  
  
  
  android {
  signingConfigs {
      release {
          keyAlias 
          keyPassword 
          storeFile file('')
          storePassword ''
      }
      debug {
          keyAlias 
          keyPassword 
          storeFile file('')
          storePassword ''
      }
  }
  compileSdkVersion 27
  buildToolsVersion '27.0.3'
  defaultConfig {
      minSdkVersion 17
      targetSdkVersion 27
      signingConfig signingConfigs.release
      multiDexEnabled true
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  productFlavors {
  }
  }
  
  dependencies {
  testCompile 'junit:junit:4.12'
  //noinspection GradleCompatible,GradleDependency
  compile 'com.android.support:appcompat-v7:27.1.1'
  //noinspection GradleDependency
  compile 'com.android.support:support-v4:27.1.1'
  //noinspection GradleDependency
  compile 'com.android.support:design:27.1.1'
  //noinspection GradleDependency
  compile 'com.android.support:cardview-v7:27.1.1'
  //noinspection GradleDependency
  compile 'com.android.support:recyclerview-v7:27.1.1'
  compile 'com.squareup.retrofit2:retrofit:2.2.0'
  compile 'org.greenrobot:eventbus:3.0.0'
  compile 'com.fasterxml.jackson.core:jackson-core:2.8.3'
  compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.3'
  compile 'com.fasterxml.jackson.core:jackson-databind:2.8.3'
  compile 'com.squareup.picasso:picasso:2.5.2'
  compile 'com.pkmmte.view:circularimageview:1.1'
  compile 'com.google.android.gms:play-services-auth:15.0.1'
  compile 'com.google.firebase:firebase-core:16.0.1'
  compile 'com.android.support:multidex:1.0.3'
  implementation 'br.com.simplepass:loading-button-android:1.14.0'
  }
  </code></pre>
  
  <p>After this my recyclerview is rendered blank. When I tried to debug the adapter class, only the constructor of the class is called and debug never reaches to any of the adapter methods like onCreateViewHolder &amp; onBindViewHolder. </p>
  
  <p>After some investigation, i come to few conclusion I like to share:</p>
  
  <ul>
  <li>If in the adapter layout, for RecyclerView if i change width and height to lets say 500dp each, I can see the list but not when they are match_parent.</li>
  <li>If instead of CoordinatorLayout as parent, i changed to Relativelayout, the listview is visible but not with CoordinatorLayout .</li>
  </ul>
  
  <p>I have already looked into other solutions like <a href="https://stackoverflow.com/questions/28115553/recyclerview-not-call-any-adapter-method-oncreateviewholder-onbindviewholder">Recyclerview not call any Adapter method :onCreateViewHolder,onBindViewHolder,</a></p>
  
  <p>But they are not helping as problem is only appearing after updating compilesdkversion to 27.</p>