Source:
<code>public void onViewCreated(@NonNull final View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mRvAllergens = view.findViewById(R.id.allergens_recycle); mEmptyMessageView = view.findViewById(R.id.emptyAllergensView); productRepository = ProductRepository.getInstance(); mDataObserver = new DataObserver(); bottomNavigationView = view.findViewById((R.id.bottom_navigation)); <START> bottomNavigationView.getMenu().getItem(0).setCheckable(false); <END> BottomNavigationListenerInstaller.install(bottomNavigationView,getActivity(),getContext()); productRepository.getAllergensByEnabledAndLanguageCode(true, Locale.getDefault().getLanguage()); final String language = LocaleHelper.getLanguage(getContext()); productRepository.getAllergensByEnabledAndLanguageCode(true, language) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(allergens -> { mAllergensEnabled = allergens; mAdapter = new AllergensAdapter(productRepository, mAllergensEnabled); mRvAllergens.setAdapter(mAdapter); mRvAllergens.setLayoutManager(new LinearLayoutManager(view.getContext())); mRvAllergens.setHasFixedSize(true); mAdapter.registerAdapterDataObserver(mDataObserver); mDataObserver.onChanged(); }, e->Log.e(AllergensAlertFragment.class.getSimpleName(),"getAllergensByEnabledAndLanguageCode",e)); productRepository.getAllergensByLanguageCode(language) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(allergens -> { mAllergensFromDao = allergens; }, e->Log.e(AllergensAlertFragment.class.getSimpleName(),"getAllergensByLanguageCode",e)); currentView = view; mSettings = getActivity().getSharedPreferences("prefs", 0); }</code><technical_language>Is put line bottomNavigationView.getMenu().getItem(0).setCheckable(false); in method BottomNavigationListenerInstaller.install(bottomNavigationView, getActivity(), getContext()); instead of in calling fragment avoid repeat line in fragments</technical_language>

Target:
public void onViewCreated(@NonNull final View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mRvAllergens = view.findViewById(R.id.allergens_recycle); mEmptyMessageView = view.findViewById(R.id.emptyAllergensView); productRepository = ProductRepository.getInstance(); mDataObserver = new DataObserver(); bottomNavigationView = view.findViewById((R.id.bottom_navigation)); BottomNavigationListenerInstaller.selectNavigationItem(bottomNavigationView, 0); BottomNavigationListenerInstaller.install(bottomNavigationView,getActivity(),getContext()); productRepository.getAllergensByEnabledAndLanguageCode(true, Locale.getDefault().getLanguage()); final String language = LocaleHelper.getLanguage(getContext()); productRepository.getAllergensByEnabledAndLanguageCode(true, language) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(allergens -> { mAllergensEnabled = allergens; mAdapter = new AllergensAdapter(productRepository, mAllergensEnabled); mRvAllergens.setAdapter(mAdapter); mRvAllergens.setLayoutManager(new LinearLayoutManager(view.getContext())); mRvAllergens.setHasFixedSize(true); mAdapter.registerAdapterDataObserver(mDataObserver); mDataObserver.onChanged(); }, e->Log.e(AllergensAlertFragment.class.getSimpleName(),"getAllergensByEnabledAndLanguageCode",e)); productRepository.getAllergensByLanguageCode(language) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(allergens -> { mAllergensFromDao = allergens; }, e->Log.e(AllergensAlertFragment.class.getSimpleName(),"getAllergensByLanguageCode",e)); currentView = view; mSettings = getActivity().getSharedPreferences("prefs", 0); }