murraycu / android-galaxyzoo

This Android app lets you classify Galaxy Zoo subjects. It is available in the Google Play Store: https://play.google.com/store/apps/details?id=com.murrayc.galaxyzoo.app . Try beta versions early here: https://play.google.com/apps/testing/com.murrayc.galaxyzoo.app . See also the iPhone app for Galaxy Zoo: https://github.com/murraycu/ios-galaxyzoo/
GNU General Public License v3.0
11 stars 13 forks source link

Our RecyclerView.Adapter is very inefficient #8

Open murraycu opened 9 years ago

murraycu commented 9 years ago

The RecyclerView.Adapter uses a Cursor to use the data from our ContentProvider: https://github.com/murraycu/android-galaxyzoo/blob/master/app/src/main/java/com/murrayc/galaxyzoo/app/ListCursorAdapter.java

But it's horribly inefficient, calling notifyDataSetChanged() whenever there is any change in the cursor, making the RecyclerView do work for each item all over again.

murraycu commented 9 years ago

There's still no obvious way to do this correctly with RecyclerView: https://github.com/googlesamples/android-RecyclerView/issues/4#issuecomment-87246333