title: Android Simple Horizontal RecyclerView very slow and not smooth
body: <p>I'm trying to implement Horizontal Recycler View but its not scrolling smooth at all.</p>
  
  <p>tried all of the following solution i found in google but none of them worked:</p>
  
  <pre><code>popularCategoriesRecyclerView.setHasFixedSize(true);
  popularCategoriesRecyclerView.setItemViewCacheSize(10);
  popularCategoriesRecyclerView.setDrawingCacheEnabled(true);
  popularCategoriesRecyclerView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_LOW);
  setHasStableIds(true);
  </code></pre>
  
  <p>I've also tried using <code>Picasso/Glide</code> and even not loading the image at all, but it still doesn't scroll smoothly.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      private RecyclerView popularCategoriesRecyclerView;
      private RecyclerView.Adapter popularCategoriesAdapter;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          RootCategory demoCategory = CreateDemoModelService.create();
  
          popularCategoriesRecyclerView = (RecyclerView)findViewById(R.id.popular_categories_recycler_view);
          popularCategoriesRecyclerView.setHasFixedSize(true);
          popularCategoriesRecyclerView.setItemViewCacheSize(10);
          popularCategoriesRecyclerView.setDrawingCacheEnabled(true);
          popularCategoriesRecyclerView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_LOW);
  
          RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,true);
              popularCategoriesRecyclerView.setLayoutManager(layoutManager);
  
          popularCategoriesAdapter = new FavoriteCategoryAdapter(demoCategory.getFavoriteCategories());
          popularCategoriesRecyclerView.setAdapter(popularCategoriesAdapter);
      }
  }  
  </code></pre>
  
  <p>and the adapter:</p>
  
  <pre><code>public class FavoriteCategoryAdapter extends RecyclerView.Adapter {
      private List&lt;Category&gt; categories;
  
      public static class ViewHolder extends RecyclerView.ViewHolder {
          TextView tv;
          ImageView iv;
  
          ViewHolder(View v) {
              super(v);
              tv = (TextView)v.findViewById(R.id.adapter_favorite_category_tv);
              iv = (ImageView)v.findViewById(R.id.adapter_favorite_category_iv);
          }
      }
  
      public FavoriteCategoryAdapter(List&lt;Category&gt; categories) {
          this.categories = categories;
          setHasStableIds(true);
      }
  
      @Override
      public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_popular_category,parent,false);
          return new FavoriteCategoryAdapter.ViewHolder(v);
      }
  
      @Override
      public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
          Category category = categories.get(position);
          FavoriteCategoryAdapter.ViewHolder viewHolder = (FavoriteCategoryAdapter.ViewHolder) holder;
  
          if (viewHolder.tv.getText() != null &amp;&amp; viewHolder.tv.getText().equals(category.getName()))
              return;
  
          Context context = viewHolder.iv.getContext();
          Resources resources = context.getResources();
          final int resourceId = resources.getIdentifier(category.getIconName() + "_popular", "drawable",
              context.getPackageName());
  
          Picasso.with(context).load(resourceId).fit().centerCrop().into(viewHolder.iv);
  
          viewHolder.tv.setText(category.getName());
      }
  
      @Override
      public int getItemCount() {
          return categories.size();
      }
  }  
  </code></pre>
  
  <p>adapter_category.xml:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"     android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:background="@drawable/adapter_popular_category_bg"&gt;
  
      &lt;ImageView
          android:id="@+id/adapter_favorite_category_iv"
          android:layout_width="90dp"
          android:layout_height="90dp"
          android:scaleType="fitCenter"/&gt;
  
      &lt;TextView
          android:id="@+id/adapter_favorite_category_tv"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:paddingTop="3dp"
          android:paddingBottom="3dp"
          android:textColor="@android:color/white"
          android:gravity="center"
          android:background="@drawable/adapter_popular_category_tv_bg"/&gt;
  &lt;/LinearLayout&gt;  
  </code></pre>
  
  <p>activity_main.xml:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginTop="10dp"
              android:layout_marginRight="10dp"
              android:layout_gravity="right"
              android:text="@string/activity_main_popular"
              android:textColor="#75A735"
              android:textAppearance="@style/TextAppearance.AppCompat.Medium"/&gt;
  
          &lt;android.support.v7.widget.RecyclerView
              android:id="@+id/popular_categories_recycler_view"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginTop="5dp"
              android:layout_marginBottom="10dp"
              android:padding="0dp"
              android:scrollbars="horizontal"/&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Can someone help me? Am i doing something wrong?</p>