Is it a ?
[ ] Bug Report
[x] Feature Request
Right now we are using ListViews. We should refactor to use RecyclerView in order to get high performance. I do understand that on smaller lists it hardly matters, but in lists with large number of entries, it does. For eg: In LibraryFragment where we have a huge list of zim files to download.
@mhutti1 @brijeshshah13 @abdulwd Your views ?
@srv-twry @mhutti1 I think it will have a positive impact on the performance. Please go ahead.
@srv-twry RecyclerView is better than ListView in many ways.Nice idea.
We must use RecyclerView for a huge list of items. So, in LibraryFragment it'll surely have a positive impact. But for small lists, as you said there's hardly any improvement so we can keep using ListView. I'm a bit busy these days because of my exams so it's difficult to balance this. So it took me time to reply.
@abdulwd I agree that RecyclerView will hardly have any improvement for small lists, however, there are other benefits as well such as these which gives itself an edge considering the future prospects. Sounds reasonable?
@brijeshshah13 I know these benefits and also I don't have any problem in converting all of them to RecyclerView. The assignee can fix this once any of the maintainers approve it. :smile:
@mhutti1 Your views please ?
Yeah, lets do this.
@srv-twry I'm working on an issue solving which will remove the entire LanguageSelectDialog class, so you don't need to change the ListView to RecyclerView in it. Just a polite reminder to save your time. :sweat_smile:
Is there anyone working on this issue. Can I start working on it ? @srv-twry
I'd like to work on this issue, can I please go ahead and do that?
@namrata-jha , sure go ahead!
Is anybody working on this issue? I would like to contribute to this project :)
@ilovrencic I think @namrata-jha is working on it.
@abdulwd and @siddharth2010, Since it has been a long time with not much progress in this issue I would like to take on this project.
Sure, go Ahead!
I am new to open source, and since no active work is going on for this issue, I will begin by converting ListView to RecyclerView, starting with LibraryFragment.
@macgills Your comment about @kanupriyaa's proposal would be welcome, just to be sure we are all on the same line.
Hi @kanupriyaa, if you could check our (incredibly recently updated) contributing guidelines you will now see that we have a new branching structure in place and develop is what should be considered the most up to date branch in terms of development.
I am not sure how many ListViews are left in the project but Library/Device/Downloading have all been converted to Recyclerview by myself as part of 2.5. If you can find a Recyclerview and convert it then by all means please do. Just be aware of the AdapterDelegates pattern used in LibraryAdapter, you can read more here, that covers the basics and I have taken it a bit further.
@kelson42 we should also make it clear to contributors that kotlin is now the preferred language of the project
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
@kelson42 we should also make it clear to contributors that kotlin is now the preferred language of the project
This is now written in the first paragraph of the README.md.
@kanupriyaa Any news on your side?

We have 3 listviews left.
@abdulwd @siddharth2010 Would you be able to help here?
@macgills Should we convert storage_select_dialog to recycler view?
@kelson42 I will try to complete one of these on this weekend.
Yes, storage select dialog is now internal to our codebase and should be treated with the same rigor.
Just to reiterate my earlier advice:
Just be aware of the AdapterDelegates pattern used in LibraryAdapter, you can read more here, that covers the basics and I have taken it a bit further.
@kelson42 I' love to convert these three List View into recyclerView. Is anyone working on it?
@geekRishabhjain You can work on it. Do read the readme and contributing.md.
@abdulwd yes, thanks.
I have converted one of the list views into the recycler view can someone please review the code before I commit and create a PR.
(I think it needs some improvement and I am facing one bug, the notifyDataSetInvalidate() in autoComplete Adapter is not getting recognized, I googled why but could not figure out)
Any other suggestions are also welcomed, here are the links for gists for the code:
SearchActivity
search.xml
[AutoCompleteAdapter.java(https://gist.github.com/geekRishabhjain/c68b5f8ed83ebc75ef249811da0d6ed9)
@geekRishabhjain If you work is not over, then open a PR in draft mode or with "WIP" written in the topic. Code review consumes time. Code review without PR is even worse... so please do a PR.
oh thanks, @kelson42 . can you please tell me how to resolve the issue(A single issue, I feel it should not take much time) in autocomplete
Line number 155, notifyDataSetInvalidated(). notifyDataSetChanged() (line 153) is working fine but not former.
On googling I found, we need to do adapter.notifyDataSetInvalidated().
Creating a PR for a buggy code won't satisfy my heart :-|
@kelson42 Sorry for asking a nuisance question, but I did some searching and am left clueless.
As you mentioned I should Create a PR with WIP in the topic. I tried committing the code and it would show me this:
BUILD FAILED in 2m 6s
20 actionable tasks: 13 executed, 7 up-to-date
> Configure project :app
Configuring Kiwix
Configuring kiwix
Configuring customexample
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 4s
1 actionable task: 1 executed
Static analysis found violations and attempted to autofix, please commit these autoformat changes
If the build failed for another reason please make sure JAVA_HOME is set to JDK8
I tried running
gradle lintKiwixDebug
It shows me '''gradle not found'''
I also looked '''java -version''' Here is the output
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~19.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
Did I did anything wrong while setting up the project?
gradlew not gradle
You didn't do anything wrong setting up the project but there are some expectations are knowing about JAVA_HOME, path varaibles and the JDK before jumping into Android development.
Due to an error with a recent merge develop is not as error free as it always should be, this would have gone a lot more frictionless if process had been followed explicitly on that PR. I have made a PR fixing that mistake and if you merge those changes then everything should go just fine
@macgills thanks, I'll look into the changes.
This is causing me headaches now,
what wrong am I doing?
git commit -m "Recycler to List Search WIP"
Running lint...
ERROR: JAVA_HOME is set to an invalid directory: /var/lib/dpkg/info/openjdk-8-jre
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
ERROR: JAVA_HOME is set to an invalid directory: /var/lib/dpkg/info/openjdk-8-jre
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
The static analysis found violations and attempted to auto fix, please commit these autoformat changes
If the build failed for another reason please make sure JAVA_HOME is set to JDK8
md5-b3fad7c4c510d111c81f72325f8f580e
echo $JAVA_HOME
md5-b3fad7c4c510d111c81f72325f8f580e
/var/lib/dpkg/info/openjdk-8-jre
md5-b3fad7c4c510d111c81f72325f8f580e
Java -version
md5-b3fad7c4c510d111c81f72325f8f580e
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~19.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
This is what I have set for my java home

This is what I have set in my PATH for java

I haven't done this on linux so stack overflow is your friend
Also from the openjdk site
The openjdk-8-jre package contains just the Java Runtime Environment. If you want to develop Java programs then please install the openjdk-8-jdk package.
So try with the JDK.
One of these have been converted. Few more to go.
two are left now. One in storage_select_dialog.xml, other in activity_local_file_transfer.xml.
@macgills Please nail down this