如何以编程方式删除android中的默认按钮样式
我移除了背景,但阴影仍在按钮下方 我知道以下属性将删除XML按钮的样式如何以编程方式删除android中的默认按钮样式,android,Android,我移除了背景,但阴影仍在按钮下方 我知道以下属性将删除XML按钮的样式 style="?android:attr/borderlessButtonStyle" 但是,我如何通过编程实现这一点 TypedValue typedValue = new TypedValue(); getContext().getTheme().resolveAttribute(R.attr.selectableItemBackground, typedValue, true); yourButton.setBac
style="?android:attr/borderlessButtonStyle"
但是,我如何通过编程实现这一点
TypedValue typedValue = new TypedValue();
getContext().getTheme().resolveAttribute(R.attr.selectableItemBackground, typedValue, true);
yourButton.setBackgroundResource(typedValue.resourceId);
给你
给你