我想为按钮设置背景。一切正常,Android 4.1.2但如果启动时Android 4.0出现错误
java.lang.NoSuchMethodError: android.widget.Button.setBackground
带代码
LayerDrawable composite = new LayerDrawable(layers);
button.setBackground(composite);
那么我怎样才能设置LayerDrawable背景但是Android 4.0更早呢?