Class Info |
|---|
public class HwSwitch extends android.widget.Switch 该类扩展了华为EMUI主题的样式。 |
Qualifier and Type | Attributes Name and Description |
|---|---|
dimension | hwLayoutPadding 小白球到边界的距离。 |
Qualifier and Type | Method Name and Description |
|---|---|
static HwSwitch | instantiate(Context context) 实例化HwSwitch对象。 |
Methods Inherited from Class android.widget.switch |
|---|
onLayout, onDraw, setChecked, onTouchEvent |
Constructor |
|---|
public HwSwitch(Context context) 通过代码实例化HwSwitch对象。 |
Parameters
Name | Description |
|---|---|
context | 控件的上下文。 |
Constructor |
|---|
public HwSwitch(Context context, AttributeSet attrs) 通过XML实例化HwSwitch对象。 |
Parameters
Name | Description |
|---|---|
context | 控件的上下文。 |
attrs | XML中配置的控件属性集合。 |