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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package com.mylhyl.circledialog.params;
 
import android.os.Parcel;
import android.os.Parcelable;
import android.view.Gravity;
import android.widget.BaseAdapter;
 
import com.mylhyl.circledialog.callback.CircleItemViewBinder;
import com.mylhyl.circledialog.res.values.CircleColor;
import com.mylhyl.circledialog.res.values.CircleDimen;
 
import androidx.recyclerview.widget.RecyclerView;
 
/**
 * items 内容参数
 * Created by hupei on 2017/3/30.
 */
public class ItemsParams implements Parcelable {
 
    public static final Creator<ItemsParams> CREATOR = new Creator<ItemsParams>() {
        @Override
        public ItemsParams createFromParcel(Parcel source) {
            return new ItemsParams(source);
        }
 
        @Override
        public ItemsParams[] newArray(int size) {
            return new ItemsParams[size];
        }
    };
    /**
     * 数据源:array or list
     */
    public Object items;
    /**
     * item高度
     */
    public int itemHeight = CircleDimen.ITEM_HEIGHT;
    /**
     * 分隔线 dp
     */
    public int dividerHeight = 1;
    /**
     * item内间距
     */
    public int[] padding;
    /**
     * item背景色
     */
    public int backgroundColor;
    /**
     * item字体色
     */
    public int textColor = CircleColor.ITEM_CONTENT_TEXT;
    /**
     * item字体大小
     */
    public int textSize = CircleDimen.ITEM_CONTENT_TEXT_SIZE;
    /**
     * 按下颜色值
     */
    public int backgroundColorPress;
    /**
     * ListView 适配器
     */
    public BaseAdapter adapter;
    /**
     * RecyclerView 适配器
     */
    public RecyclerView.Adapter adapterRv;
    /**
     * RecyclerView 布局管理
     */
    public RecyclerView.LayoutManager layoutManager;
 
    @RecyclerView.Orientation
    public int linearLayoutManagerOrientation = RecyclerView.VERTICAL;
    /**
     * RecyclerView 分隔线
     */
    public RecyclerView.ItemDecoration itemDecoration;
    /**
     * 列表与底部按钮的距离
     */
    public int bottomMargin = CircleDimen.BUTTON_ITEMS_MARGIN;
 
    public int textGravity = Gravity.NO_GRAVITY;
    public CircleItemViewBinder viewBinder;
 
    public ItemsParams() {
    }
 
    protected ItemsParams(Parcel in) {
        this.itemHeight = in.readInt();
        this.dividerHeight = in.readInt();
        this.padding = in.createIntArray();
        this.backgroundColor = in.readInt();
        this.textColor = in.readInt();
        this.textSize = in.readInt();
        this.backgroundColorPress = in.readInt();
        this.linearLayoutManagerOrientation = in.readInt();
        this.bottomMargin = in.readInt();
        this.textGravity = in.readInt();
    }
 
    @Override
    public int describeContents() {
        return 0;
    }
 
    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.itemHeight);
        dest.writeInt(this.dividerHeight);
        dest.writeIntArray(this.padding);
        dest.writeInt(this.backgroundColor);
        dest.writeInt(this.textColor);
        dest.writeInt(this.textSize);
        dest.writeInt(this.backgroundColorPress);
        dest.writeInt(this.linearLayoutManagerOrientation);
        dest.writeInt(this.bottomMargin);
        dest.writeInt(this.textGravity);
    }
}