FluidBottomNavigation-android
FluidBottomNavigation-android copied to clipboard
How to use this library in android java application
I have imported this library and write down java code for fluidBottomNavigation. But it does not show in activity after the run.Below is my code.
fluidBottomNavigation = findViewById(R.id.fluidBottomNavigation);
fluidBottomNavigation.setAccentColor(ContextCompat.getColor(this, R.color.colorPrimaryDark));
fluidBottomNavigation.setBackColor(ContextCompat.getColor(this, R.color.colorPrimaryDark));
fluidBottomNavigation.setTextColor(ContextCompat.getColor(this, R.color.colorPrimaryDark));
fluidBottomNavigation.setIconColor(ContextCompat.getColor(this, R.color.colorPrimary));
fluidBottomNavigation.setIconSelectedColor(ContextCompat.getColor(this, R.color.color_green));
fluidBottomNavigationItems.add(new FluidBottomNavigationItem(
getString(R.string.str_add_client),
ContextCompat.getDrawable(this, R.drawable.ic_call)));
fluidBottomNavigationItems.add(new FluidBottomNavigationItem(
getString(R.string.str_add_client),
ContextCompat.getDrawable(this, R.drawable.ic_about)));
fluidBottomNavigationItems.add(new FluidBottomNavigationItem(
getString(R.string.str_add_client),
ContextCompat.getDrawable(this, R.drawable.ic_calendar)));
fluidBottomNavigationItems.add(new FluidBottomNavigationItem(
getString(R.string.str_add_client),
ContextCompat.getDrawable(this, R.drawable.ic_change_password)));
fluidBottomNavigationItems.add(new FluidBottomNavigationItem(
getString(R.string.str_add_client),
ContextCompat.getDrawable(this, R.drawable.ic_delete)));
FluidBottomNavigation fluidBottomNavigation; List<FluidBottomNavigationItem> fluidBottomNavigationItems=new ArrayList<>();
fluidBottomNavigation = findViewById(R.id.fluidBottomNavigation);
fluidBottomNavigationItems.add(new FluidBottomNavigationItem(
getString(R.string.news), ContextCompat.getDrawable(this, R.drawable.ic_news)));
fluidBottomNavigationItems.add(new FluidBottomNavigationItem(
getString(R.string.inbox), ContextCompat.getDrawable(this, R.drawable.ic_inbox)));
fluidBottomNavigationItems.add(new FluidBottomNavigationItem(
getString(R.string.calendar),
ContextCompat.getDrawable(this, R.drawable.ic_calendar)));
fluidBottomNavigationItems.add(new FluidBottomNavigationItem(
getString(R.string.chat),
ContextCompat.getDrawable(this, R.drawable.ic_chat)));
fluidBottomNavigation.setItems(fluidBottomNavigationItems); //you missed this