I have five fragments with the bottom navigation menu. Currently, when I am in the 'home' fragment (home - bottom menu) and if I hit that again it reloads the recyclerView. The main issue is that, if the user hits the home menu again when the recyclerView loading is in progress, the app crashes with the following error.
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.tradaxis.utils.MSPTextViewBold.setVisibility(int)' on a null object reference
which is pointing at the visibility of the views (EditText, RecyclerView, etc)
If there is any solution for the above issue, then that is what I need else, I was thinking to disable (non-clickable) the bottom navigation menu item (of that particular fragment, that is, the current fragment in which the user is in).
How can I do this?
Note: My recyclerView has to load data from the Firestore