public class QMUIRoundButton extends QMUIAlphaButton
注意: 因为该控件的圆角采用 View 的 background 实现, 所以与原生的 android:background 有冲突。
android:background 指定 background, 该 background 不会生效。#setBackgroundResource(int) 等方法设置背景, 该背景将覆盖圆角效果。
如需在 xml 中指定圆角、边框颜色、边框粗细、背景色等值,采用 xml 属性 com.qmuiteam.qmui.R.styleable#QMUIRoundButton
如需在 Java 中指定以上属性, 需要通过 #getBackground() 获取 QMUIRoundButtonDrawable 对象,
然后使用 QMUIRoundButtonDrawable 提供的方法进行设置。
| 构造器和说明 |
|---|
QMUIRoundButton(android.content.Context context) |
QMUIRoundButton(android.content.Context context,
android.util.AttributeSet attrs) |
QMUIRoundButton(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
setChangeAlphaWhenDisable, setChangeAlphaWhenPress, setEnabled, setPressedpublic QMUIRoundButton(android.content.Context context)
public QMUIRoundButton(android.content.Context context,
android.util.AttributeSet attrs)
public QMUIRoundButton(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)