iyesha-Gonzalez / RattlerConnect

0 stars 0 forks source link

navigation tab created #9

Open iyesha-Gonzalez opened 3 years ago

iyesha-Gonzalez commented 3 years ago

this is code to implement the bottom navigation into the project

BottomNavigationView bottomNavigationView = (BottomNavigationView) findViewById(R.id.bottom_navigation);

bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.action_home: // do something here return true; case R.id.action_message: // do something here return true; case R.id.action_compose: // do something here return true; case R.id.action_profile: // do something here return true; default: return true; } } });