title: RecyclerView scrolling laggy on newer android versions
body: <p>My <code>RecyclerView</code> is pretty laggy whenever I start to scroll over the first items in a cold app start. This behavior happens for the latest android versions (tested on API level 27 and 28) but not older ones (tested on API level 22).</p>
  
  <p>I tried both versions, the normal <code>com.android.support:appcompat-v7:28.0.0</code> and androidx <code>com.google.android.material:material:1.1.0-alpha03</code>.</p>
  
  <p>The test project is pretty simple:</p>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      RecyclerView recyclerView = findViewById(R.id.recyclerview);
      recyclerView.setLayoutManager(new LinearLayoutManager(this));
      recyclerView.setHasFixedSize(true);
      recyclerView.setItemViewCacheSize(20);
  
      ArrayList&lt;String&gt; list = new ArrayList&lt;&gt;();
  
      for (int i = 0; i &lt; 200; i++) {
          list.add(String.valueOf(i));
      }
  
      MyAdapter adapter = new MyAdapter(MainActivity.this, list);
      recyclerView.setAdapter(adapter);
  }
  }
  </code></pre>
  
  <p>activity_main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout 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/container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MainActivity"&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/recyclerview"
          android:layout_width="0dp"
          android:layout_height="0dp"
          android:layout_marginStart="8dp"
          android:layout_marginTop="8dp"
          android:layout_marginEnd="8dp"
          android:layout_marginBottom="8dp"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>MyAdapter.java</p>
  
  <pre><code>public class MyAdapter extends RecyclerView.Adapter&lt;MyAdapter.ViewHolder&gt; {
  
  List&lt;String&gt; mData;
  Context context;
  LayoutInflater mInflater;
  
  public MyAdapter(Context context, List&lt;String&gt; data) {
      this.mData = data;
      this.context = context;
      this.mInflater = LayoutInflater.from(context);
  }
  
  
  @NonNull
  @Override
  public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
      View view = mInflater.inflate(R.layout.recycler_item, viewGroup, false);
      return new ViewHolder(view);
  }
  
  @Override
  public void onBindViewHolder(@NonNull ViewHolder viewHolder, int i) {
      viewHolder.tv.setText(String.valueOf(i));
  }
  
  @Override
  public int getItemCount() {
      return mData.size();
  }
  
  public String getItem(int id) {
      return mData.get(id);
  }
  
  public class ViewHolder extends RecyclerView.ViewHolder {
  
      TextView tv;
  
      public ViewHolder(@NonNull View itemView) {
          super(itemView);
  
          tv = itemView.findViewById(R.id.item_tv);
      }
  }
  }
  </code></pre>
  
  <p>recycler_item.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout 
  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="wrap_content"
  xmlns:tools="http://schemas.android.com/tools"&gt;
  
  &lt;TextView
      android:id="@+id/item_tv"
      android:layout_width="match_parent"
      android:layout_height="50dp"
      android:layout_marginStart="8dp"
      android:layout_marginTop="8dp"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>Any ideas for solving the problem or is it a library issue which can't be solved by myself (waiting for new official release)?</p>