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

Added the ability to set a custom background color, custom tab icon colors, and icon alpha #302

Merged
merged 2 commits into from
Jul 4, 2016

Conversation

mikemilla
Copy link
Contributor

Changed these colors and also changed the bottom bar shadow to not be as intense. Also add the activity to the sample app to see this in action.

screenshot_20160617-150914

@felipeleusin
Copy link

Thanks, I was about to write a similar pull request. Imho this whole color thing should be the less magical possible. It should just inherit the app themes colors and allow for substitutions without worrying too much about what the users set.

@mikemilla
Copy link
Contributor Author

Exactly. Material design guidelines are just guidelines, not specific rules we have to follow.

@wuchangfeng
Copy link

@mikemilla Thanks. Very cool. That is what i want.

@roughike roughike merged commit d5f3792 into roughike:master Jul 4, 2016
@Studentessa
Copy link

Hi @mikemilla when I started using this new ability (great ability any way, I was watting for this), apps crahs in terminal with api < 21.
Do i have to open a new issue?

@DanielKou
Copy link

Hey, how do I use this? Which method do I call to set the custom icon colors?

@Studentessa
Copy link

@DanielKou you set colors using the constructor, like this:
mBottomBar = BottomBar.attach(this, savedInstanceState, Color.parseColor("#FFFFFF"), // Background Color Color.parseColor("#0DA5F2"), // Tab Item Color 0.25f);

@mikemilla
Copy link
Contributor Author

@Studentessa I can't remember if I tested it on a preAPI21 device or not! Feel free to make adjustments to this code if you'd like or I will investigate when I get a chance.

Also, thank you for addressing Daniel's issue :)

@Studentessa
Copy link

Studentessa commented Jul 18, 2016

@mikemilla the problem is not on preAPI21, it's using tablets with mIsTabletMode activate (I was testing on a preAPI21 tablet deviced).
I will try to fixed the problem, I have found why is the problem (mInActiveColor is null when we set customs colors)!

@mikemilla
Copy link
Contributor Author

@Studentessa ok, thank you for finding it :)

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

Successfully merging this pull request may close these issues.

6 participants