【发布时间】:2015-11-04 01:47:20
【问题描述】:
我在布局中使用标准按钮:
<Button
android:id="@+id/earlier_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="earlier"/>
我想出了如何在不改变默认样式的情况下改变它的颜色:
earlierButton = (Button) findViewById(R.id.earlier_button);
earlierButton.getBackground().setColorFilter(getResources().getColor(R.color.red_500), PorterDuff.Mode.MULTIPLY);
我现在的问题是,如何设置新的选择器/波纹或更改当前选择器的颜色?有谁知道需要为此覆盖的默认主题/样式?谈论这些按钮:
【问题讨论】:
标签: android button themes selector