fixed switiching between fragments
This commit is contained in:
parent
6bfdc768a3
commit
7072ecfe59
@ -69,28 +69,25 @@ public class MainActivity extends AppCompatActivity {
|
||||
mMainNav.setSelectedItemId(R.id.nav_map);
|
||||
|
||||
/* code below is resposible for changing colours of tabs in main tab menu */
|
||||
/* mMainNav.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
|
||||
mMainNav.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
|
||||
@Override
|
||||
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
|
||||
|
||||
switch (item.getItemId()) {
|
||||
case R.id.nav_map:
|
||||
mMainNav.setItemBackgroundResource(R.color.colorPrimaryDark);
|
||||
setFragment(mapFragment);
|
||||
return true;
|
||||
case R.id.nav_notif:
|
||||
mMainNav.setItemBackgroundResource(R.color.colorPrimaryDark);
|
||||
setFragment(notificationFragment);
|
||||
return true;
|
||||
case R.id.nav_profile:
|
||||
mMainNav.setItemBackgroundResource(R.color.colorPrimaryDark);
|
||||
setFragment(profileFragment);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});*/
|
||||
});
|
||||
|
||||
|
||||
// Logout button
|
||||
|
Loading…
Reference in New Issue
Block a user