Source:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.e("TAG", "lfmain"); ButterKnife.bind(this); navigationView = findViewById(R.id.bottombar); favicon = findViewById(R.id.Drawer_favourite_Icon); rvAlbums = findViewById(R.id.grid_albums); rvMedia = findViewById(R.id.grid_photos); overridePendingTransition(R.anim.right_to_left, R.anim.left_to_right); SP = PreferenceUtil.getInstance(getApplicationContext()); albumsMode = true; editMode = false; securityObj = new SecurityHelper(LFMainActivity.this); if (getIntent().getExtras() != null) pickMode = getIntent().getExtras().getBoolean(SplashScreen.PICK_MODE); SP.putBoolean(getString(R.string.preference_use_alternative_provider), false); initUI(); activityContext = this; new initAllPhotos().execute(); new SortModeSet(activityContext).execute(DATE); displayData(getIntent().getExtras()); checkNothing(); populateAlbum(); navigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { int itemID = item.getItemId(); if (itemID == R.id.navigation_home) { if(textView.getVisibility() == View.VISIBLE){ textView.setVisibility(View.GONE); } if (!localFolder) { hidden = false; localFolder = true; findViewById(R.id.ll_drawer_hidden).setBackgroundColor(Color.TRANSPARENT); findViewById(R.id.ll_drawer_Default).setBackgroundColor(getHighlightedItemColor()); tint(); } displayAlbums(); return true; } return LFMainActivity.super.onNavigationItemSelected(item); } }); }

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.e("TAG", "lfmain"); ButterKnife.bind(this); navigationView = findViewById(R.id.bottombar); favicon = findViewById(R.id.Drawer_favourite_Icon); rvAlbums = findViewById(R.id.grid_albums); rvMedia = findViewById(R.id.grid_photos); overridePendingTransition(R.anim.right_to_left, R.anim.left_to_right); SP = PreferenceUtil.getInstance(getApplicationContext()); albumsMode = true; editMode = false; securityObj = new SecurityHelper(LFMainActivity.this); if (getIntent().getExtras() != null) pickMode = getIntent().getExtras().getBoolean(SplashScreen.PICK_MODE); SP.putBoolean(getString(R.string.preference_use_alternative_provider), false); initUI(); activityContext = this; new initAllPhotos().execute(); new SortModeSet(activityContext).execute(DATE); displayData(getIntent().getExtras()); checkNothing(); populateAlbum(); navigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { int itemID = item.getItemId(); if (itemID == R.id.navigation_home) { if(textView.getVisibility() == View.VISIBLE){ textView.setVisibility(View.GONE); } if (!localFolder) { hidden = false; localFolder = true; findViewById(R.id.ll_drawer_hidden).setBackgroundColor(Color.TRANSPARENT); findViewById(R.id.ll_drawer_Default).setBackgroundColor(getHighlightedItemColor()); tint(); } displayAlbums(); return true; } return LFMainActivity.super.onNavigationItemSelected(item); } }); if (getIntent().getBooleanExtra("openFav", false)) { displayfavourites(); favourites = false; } }