@@ -75,7 +75,7 @@ class StatusView @JvmOverloads constructor(
7575 * A min margin that there should be between every adjacent status Text
7676 * Note# This only applies if obeyLineLength is set to false
7777 */
78- var minMarginStatusText: Float by OnLayoutProp (10 .0f .pxValue())
78+ var minMarginStatusText: Float by OnLayoutProp (5 .0f .pxValue())
7979
8080 /* *
8181 * Set true to obey Status Text i.e alphabets or words belonging to one line would not cross
@@ -111,7 +111,7 @@ class StatusView @JvmOverloads constructor(
111111 * Length of line to be drawn between circles
112112 * #Note: This does not include line gap
113113 */
114- var lineLength: Float = 30.0f .pxValue() /* by OnLayoutProp(30.0f.pxValue())*/ // dp
114+ var lineLength: Float by OnLayoutProp (30.0f .pxValue()) // dp
115115
116116 /* *
117117 * Stroke width of each circle to be drawn
@@ -382,7 +382,7 @@ class StatusView @JvmOverloads constructor(
382382 drawLabels = a.getBoolean(R .styleable.StatusView_drawCount , drawLabels)
383383 obeyLineLength = a.getBoolean(R .styleable.StatusView_obeyLineLength , obeyLineLength)
384384 lineGap = a.getDimension(R .styleable.StatusView_lineGap , lineGap)
385- minMarginStatusText = a.getDimension(R .styleable.StatusView_minMarginStatus , minMarginStatusText)
385+ minMarginStatusText = a.getDimension(R .styleable.StatusView_minStatusMargin , minMarginStatusText)
386386 labelTopMargin = a.getDimension(R .styleable.StatusView_labelTopMargin , labelTopMargin)
387387
388388
@@ -779,7 +779,11 @@ class StatusView @JvmOverloads constructor(
779779
780780 val widestLineData: StatusTextWidthInfo = getStatusTextWidthInfo(statusData.map { it.text }, mTextPaintStatus)
781781
782- lineLengthComputed + = widestLineData.widestStatus.width - minStatusWidth(widestLineData.widestStatus.pos)
782+ val minStatusWidthWidestPos = minStatusWidth(widestLineData.widestStatus.pos)
783+ if (widestLineData.widestStatus.width> minStatusWidthWidestPos){
784+ lineLengthComputed + = widestLineData.widestStatus.width - minStatusWidthWidestPos
785+
786+ }
783787
784788 widestLineData.subordinateWidestStatus?.run {
785789 val minStatusWidth = minStatusWidth(pos)
0 commit comments