1

I was wondering if there were a set of standards or best practices for displaying information in lists for mobile applications (specifically Android applications that utilize RecyclerViews and custom RecyclerAdapters). I would be especially interested in hearing about this from Android developers who currently work or have worked at professional development agencies. I thought I would post this here as it seems a little to general for SO.

For example, is there a list of quality standards that one goes through before deciding that yes, the way I retrieve and display information in my app's main data feed is satisfactory enough for a production build?

In particular, it would beneficial if your answer addressed the following with examples:

  • Is data cached in the local datastore for offline viewing?
  • Are server queries sufficiently separated from business logic?
  • Do we extend our layout with a custom LinearLayout Manager so that images are loaded before they are seen by the user?
  • Have we implemented an OnScrollListener of some kind to load additional information once the user has scrolled through say 20 adapter items so that we aren't immediately bogging down performance by loading everything all at once?
  • Etc, etc.

The question is fairly open-ended but at the same time, I suspect there is a lot of convergence in terms of what a good feed looks like. It would be nice to know which methods, libraries, etc. you use for each of the above considerations, and when you have decided that your feed is sufficiently fast and stable for use in production.

As an example, I've included a fragment and associated adapter to show you just how probably bad the feed is in one of my open-source apps. Given that I have not worked at an Android agency, I'm really not sure how to compare what I've produced with what is typically seen in professional production-grade applications:

FeedFragment: https://github.com/santafebound/yeetclub-android/blob/master/app/src/main/java/com/yeetclub/android/fragment/FeedFragment.java FeedAdapter: https://github.com/santafebound/yeetclub-android/blob/master/app/src/main/java/com/yeetclub/android/adapter/FeedAdapter.java

You don't have to look at these, but a general list of things to be aware of and to optimize for RecyclerViews and their adapters would probably be of great benefit to Android developers in general. Thanks in advance for your input. Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.