Skip to content
This repository has been archived by the owner on Jun 22, 2018. It is now read-only.

Library to help products migrate from ListView to RecyclerView.

License

Notifications You must be signed in to change notification settings

fbsamples/ListViewToRecyclerView

Repository files navigation

** THIS REPO HAS BEEN ARCHIVED AND IS NO LONGER BEING ACTIVELY MAINTAINED **

ListViewToRecyclerView

Authors

  • Omer Strulovich (strulovich)
  • Jason Sendros
  • Jingbo Yang
  • Benjamin Jaeger (jaegs)

Overview

ListViewToRecyclerView is a sample utility to assist with migrations from Android's ListView widget to the new RecyclerView widget which is not backwards compatible.

ListViewToRecyclerView provides an opaque interface for a scrolling view, ScrollingViewProxy, that can be backed by either a ListView or a RecyclerView. ScrollingViewProxy uses the same method signatures as ListView so it easy to replace all calls to ListView with calls to ListViewProxy, the ListView implementation of ScrollingViewProxy.

Next, RecyclerViewProxy, the RecyclerView implementation of ScrollingViewProxy, can be swapped in to complete the migration. To assist with migrations, RecyclerViewProxy backports a few features of ListView, such as onItemClickListeners and header/footer views, that are missing from RecyclerView.

Please note, though, that every app's usage of ListView is different, hence the required migration steps will differ accordingly.

Sample Usage

Example usage can be seen in ScrollingActivity. The sample app can be run through Android Studio.

Additional Resources

For more information, please refer to the presentation at DroidCon 2016.

About

Library to help products migrate from ListView to RecyclerView.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages