kimi
2021-02-18 749a5510a9f014446a3cd6ba57b3cb0cc8148dc1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
package com.mylhyl.circledialog.params;
 
import android.graphics.Typeface;
import android.os.Parcel;
import android.os.Parcelable;
 
import com.mylhyl.circledialog.res.values.CircleColor;
import com.mylhyl.circledialog.res.values.CircleDimen;
 
/**
 * 按钮参数
 * Created by hupei on 2017/3/30.
 */
public class ButtonParams implements Parcelable {
 
    public static final Creator<ButtonParams> CREATOR = new Creator<ButtonParams>() {
        @Override
        public ButtonParams createFromParcel(Parcel source) {
            return new ButtonParams(source);
        }
 
        @Override
        public ButtonParams[] newArray(int size) {
            return new ButtonParams[size];
        }
    };
    /**
     * 按钮框与顶部距离 dp
     */
    public int topMargin;
    /**
     * 按钮文本颜色
     */
    public int textColor = CircleColor.FOOTER_BUTTON_TEXT_POSITIVE;
    /**
     * 按钮文本大小 sp
     */
    public int textSize = CircleDimen.FOOTER_BUTTON_TEXT_SIZE;
    /**
     * 按钮高度 dp
     */
    public int height = CircleDimen.FOOTER_BUTTON_HEIGHT;
    /**
     * 按钮背景颜色
     */
    public int backgroundColor;
    /**
     * 按钮文本
     */
    public String text;
 
    /**
     * 是否禁用按钮,true禁用
     */
    public boolean disable;
 
    /**
     * 禁用后的按钮文本颜色
     */
    public int textColorDisable = CircleColor.FOOTER_BUTTON_DISABLE;
 
    /**
     * 按下颜色值
     */
    public int backgroundColorPress;
    /**
     * 字样式
     * {@linkplain Typeface#NORMAL NORMAL}
     * {@linkplain Typeface#BOLD BOLD}
     * {@linkplain Typeface#ITALIC ITALIC}
     * {@linkplain Typeface#BOLD_ITALIC BOLD_ITALIC}
     */
    public int styleText = Typeface.NORMAL;
 
    public ButtonParams() {
    }
 
    protected ButtonParams(Parcel in) {
        this.topMargin = in.readInt();
        this.textColor = in.readInt();
        this.textSize = in.readInt();
        this.height = in.readInt();
        this.backgroundColor = in.readInt();
        this.text = in.readString();
        this.disable = in.readByte() != 0;
        this.textColorDisable = in.readInt();
        this.backgroundColorPress = in.readInt();
        this.styleText = in.readInt();
    }
 
    @Override
    public int describeContents() {
        return 0;
    }
 
    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.topMargin);
        dest.writeInt(this.textColor);
        dest.writeInt(this.textSize);
        dest.writeInt(this.height);
        dest.writeInt(this.backgroundColor);
        dest.writeString(this.text);
        dest.writeByte(this.disable ? (byte) 1 : (byte) 0);
        dest.writeInt(this.textColorDisable);
        dest.writeInt(this.backgroundColorPress);
        dest.writeInt(this.styleText);
    }
}