Horizontal ListView in Android?

As per Android Documentation RecyclerView is the new way to organize the items in listview and to be displayed horizontally

Advantages:

  1. Since by using Recyclerview Adapter, ViewHolder pattern is automatically implemented
  2. Animation is easy to perform
  3. Many more features

More Information about RecyclerView:

  1. grokkingandroid.com
  2. antonioleiva.com

Sample:

survivingwithandroid.com

Just add the below block to make the ListView to horizontal from vertical

Code-snippet

LinearLayoutManager layoutManager= new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL, false);
mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view);
mRecyclerView.setLayoutManager(layoutManager);

Leave a Comment