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

setImageResourceActive problem #23

Open
gurikoxo opened this issue Jul 15, 2016 · 2 comments
Open

setImageResourceActive problem #23

gurikoxo opened this issue Jul 15, 2016 · 2 comments

Comments

@gurikoxo
Copy link

gurikoxo commented Jul 15, 2016

Hi,

When I set the drawable via setImageResourceActive() method, the initial drawable resource not shown for first time opened app. after select /unselect the drawable changing working. did i miss anything? can you help for this.

|Thanks.

 final BottomNavigationView bottomNavigationView =(BottomNavigationView)findViewById(R.id.bottomNavigation);

        BottomNavigationItem homeNavigationItem = new BottomNavigationItem
                ("Feed", ContextCompat.getColor(this, R.color.colorAccent), R.drawable.ic_home_icon);
        BottomNavigationItem recentsNavigationItem = new BottomNavigationItem
                ("Recents", Color.parseColor("#553e52"), R.drawable.ic_wall_clock);
        BottomNavigationItem vaskNavigationItem = new BottomNavigationItem
                ("Vask", Color.parseColor("#7B1FA2"), R.drawable.vask_icon);
        final BottomNavigationItem favoritesNavigationItem = new BottomNavigationItem
                ("Favorites",Color.parseColor("#FF5252"), R.drawable.heart_shape);

  favoritesNavigationItem.setImageResource(R.drawable.heart_shape);
        favoritesNavigationItem.setImageResourceActive(R.drawable.vask_icon);

  BottomNavigationItem profileNavigationItem = new BottomNavigationItem
                ("Profile", Color.parseColor("#FF9800"), R.drawable.ic_user_silhouette);

        bottomNavigationView.addTab(homeNavigationItem);
        bottomNavigationView.addTab(recentsNavigationItem);
        bottomNavigationView.addTab(vaskNavigationItem);
        bottomNavigationView.addTab(favoritesNavigationItem);
        bottomNavigationView.addTab(profileNavigationItem);
@NeroLoh
Copy link

NeroLoh commented May 6, 2017

i met this problem too,is there anybody solve this?

@cnneillee
Copy link

cnneillee commented Jan 26, 2018

#31 may solve this problem!

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

3 participants