thunderbird-android
thunderbird-android copied to clipboard
Replace ListView with RecyclerView
Is your feature request related to a problem? Please describe.
I think RecyclerView is better because:
- It has better performance
- It has better support with new Material and other Android components (e.g. CollapsingToolbarLayout)
- It is more extendable
- It has integrated animations for adding, updating, and removing items
- It is easier to implement something (e.g. endless scroll, swipe to delete, DiffUtil, etc.)
Describe the solution you'd like
I want to create a pull request to replace ListView with RecyclerView in MessageListFragment.
Describe alternatives you've considered
RecyclerView is my alternative solution.
Additional context
I know that there were some pull requests about this issue. #2916 #3066 #3164
But those codes aren't usable for now. Because there were lots of code refactoring since then. (For example, codes refactored to Kotlin, adapter type changed from curser to BaseAdapter, and many more changes in the adapter and other parts of code)
Replacing ListView
with RecyclerView
is very much the plan. However, I don't want to do (or merge) this before 6.000 is released.
I suppose all occurrences of ListView are getting replaced? https://github.com/k9mail/k-9/search?q=ListView Or only the ones with ties to the MessageList class/view? Also MessageListFragment.
Can this be done by an android novice like me? I'm familiar with contributing guidelines, rebasing my branch and whatsonot.
@cpwnd: As someone new to Android development, you probably shouldn't start with attempting to modify MessageListFragment
.
There's no big benefit to just replacing the other ListViews. However, some screens need a general overhaul. A good place to start is probably the "edit identity" screen. I've created issue #6065 for that. Afterwards you could overhaul the "Manage identities" screen which could include replacing its ListView
.
I suppose all occurrences of ListView are getting replaced? https://github.com/k9mail/k-9/search?q=ListView Or only the ones with ties to the MessageList class/view? Also MessageListFragment.
Can this be done by an android novice like me? I'm familiar with contributing guidelines, rebasing my branch and whatsonot.
I think only MessageListFragment is important for change. Other classes are simple and they don't need any special features from RecyclerView.
I'm ready to send a pull request for this issue if you are OK.
@rezazarchi: Now that the "swipe between messages" branch has been merged, I have currently no plans to work on the message list code. If you're still up for replacing the ListView
with a RecyclerView
, please go ahead.
Fixed by #6299