Skip to content

Commit 102c064

Browse files
committed
Improve attributes and parameters order
1 parent a4277d6 commit 102c064

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

TimelineView/src/main/java/com/lriccardo/timelineview/TimelineDecorator.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import androidx.core.view.children
88
import androidx.recyclerview.widget.RecyclerView
99

1010
class TimelineDecorator(
11-
val indicatorSize: Float = 12.toPx().toFloat(),
1211
val indicatorStyle: TimelineView.IndicatorStyle = TimelineView.IndicatorStyle.Filled,
12+
val indicatorSize: Float = 12.toPx().toFloat(),
1313
val checkedIndicatorSize: Float? = null,
1414
val checkedIndicatorStrokeWidth: Float = 4.toPx().toFloat(),
15-
val lineWidth: Float? = null,
1615
val lineStyle: TimelineView.LineStyle? = null,
16+
val lineWidth: Float? = null,
1717
val padding: Float = 16.toPx().toFloat(),
1818
val position: Position = Position.Left,
1919
@ColorInt val indicatorColor: Int? = null,

TimelineView/src/main/res/values/attrs.xml

+12-8
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,26 @@
77
<enum name="last" value="2"/>
88
<enum name="spacer" value="3"/>
99
</attr>
10-
<attr name="indicator_size" format="dimension"/>
11-
<attr name="checked_indicator_size" format="dimension"/>
12-
<attr name="checked_indicator_stroke_width" format="dimension"/>
13-
<attr name="indicator_color" format="color"/>
10+
1411
<attr name="indicator_style" format="enum">
1512
<enum name="filled" value="0"/>
1613
<enum name="empty" value="1"/>
1714
<enum name="checked" value="2"/>
1815
</attr>
19-
<attr name="line_width" format="dimension"/>
20-
<attr name="line_dash_length" format="dimension"/>
21-
<attr name="line_dash_gap" format="dimension"/>
22-
<attr name="line_color" format="color"/>
16+
<attr name="indicator_size" format="dimension"/>
17+
<attr name="indicator_color" format="color"/>
18+
19+
<attr name="checked_indicator_size" format="dimension"/>
20+
<attr name="checked_indicator_stroke_width" format="dimension"/>
21+
2322
<attr name="line_style" format="enum">
2423
<enum name="normal" value="0"/>
2524
<enum name="dashed" value="1"/>
2625
</attr>
26+
<attr name="line_width" format="dimension"/>
27+
<attr name="line_color" format="color"/>
28+
29+
<attr name="line_dash_length" format="dimension"/>
30+
<attr name="line_dash_gap" format="dimension"/>
2731
</declare-styleable>
2832
</resources>

0 commit comments

Comments
 (0)