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 set the background-color of the items in Ham Button type programmatically #237

Open
wann2 opened this issue Oct 13, 2019 · 1 comment

Comments

@wann2
Copy link

wann2 commented Oct 13, 2019

I'd like to set the background-color of the items in Ham Button type programmatically.
All items of them are set with random color as its background.
How can I do it?

@kayhanakbay
Copy link

Example :

return new HamButton.Builder()
.normalImageRes(imageRes)
.shadowCornerRadius(Util.dp2px(10))
.rippleEffect(true)
.buttonCornerRadius(Util.dp2px(10))
.textSize(14)
.subTextSize(12)
.imagePadding(new Rect(10, 10, 10, 10))
.normalColorRes(R.color.design_default_color_background)
.typeface(Typeface.DEFAULT_BOLD)
.normalTextColorRes(R.color.white)
.normalText(normalText)
.subNormalText(subNormalText)
.listener(listener);

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