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's color can't change) #152

Open
JasonToJan opened this issue Sep 20, 2017 · 3 comments
Open

按钮的颜色无法修改(Button's color can't change) #152

JasonToJan opened this issue Sep 20, 2017 · 3 comments

Comments

@JasonToJan
Copy link

有些人说默认按钮颜色 是浅蓝色,会让人误以为无法点击,如果可以自定义确定或者取消按钮的颜色,那将是极大的方便。
Some users think the defalut color of "OK" can't not click because the color is wathet blue. If we can custom
the color,it will be great convenience.

@ajitbabu
Copy link

ajitbabu commented Mar 1, 2018

Hi Jason,
You can customize button like this
Button confirmButton = (Button) alertDialog.findViewById(R.id.confirm_button);
confirmButton.setBackgroundResource(R.drawable.customized_button);
confirmButton.setPadding(0, 1, 0, 1);
confirmButton.setTextSize(getResources().getInteger(R.integer.text_words_small_int));
confirmButton.setWidth(getResources().getInteger(R.integer.button_small_int));

@StevenZhang123
Copy link

改颜色最简单的方法就是先倒入作者的library,然后在value里面自定制你喜欢的。
#175

@zzy0516alex
Copy link

嗨,杰森,你可以像这样自定义按钮 按钮确认按钮 = (按钮) alertDialog.findViewById(R.id.confirm_button); confirmButton.setBackgroundResource(R.drawable.customized_button); confirmButton.setPadding(0, 1, 0, 1); confirmButton.setTextSize(getResources().getInteger(R.integer.text_words_small_int)); confirmButton.setWidth(getResources().getInteger(R.integer.button_small_int));

And put those code after "show".

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

4 participants