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

[Button] How MaterialButton set color gradient? #2010

Closed
magic0908 opened this issue Jan 27, 2021 · 1 comment
Closed

[Button] How MaterialButton set color gradient? #2010

magic0908 opened this issue Jan 27, 2021 · 1 comment

Comments

@magic0908
Copy link

magic0908 commented Jan 27, 2021

like this
image
MaterialButton set horizontal or vertical direction color gradient?
I hope use custom attr label
<declare-styleable name=""> <attr name="horizontal_color_start"/> <attr name="horizontal_color_end"/> ... </declare-styleable>

and then activity_main.xml

<com.google.android.material.button.MaterialButton app:horizontal_color_start="@color/colorPrimary" app:horizontal_color_end="@color/colorAccent" ... />

@pekingme pekingme changed the title How MaterialButton set color gradient? [Button] How MaterialButton set color gradient? Jan 27, 2021
@pekingme
Copy link
Contributor

Duplicate of #1167

@pekingme pekingme marked this as a duplicate of #1167 Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants