Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this library in android java application #17

Open
jayminsoneji opened this issue Mar 16, 2020 · 1 comment
Open

How to use this library in android java application #17

jayminsoneji opened this issue Mar 16, 2020 · 1 comment

Comments

@jayminsoneji
Copy link

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)));
@dondeepak
Copy link

FluidBottomNavigation fluidBottomNavigation;
List 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants