@@ -72,6 +72,16 @@ class StatusView @JvmOverloads constructor(
7272 }
7373
7474
75+ /* *
76+ * Set true to obey Status Text i.e alphabets or words belonging to one line would not cross
77+ * to the other line so the line length between circles would be increased as per if needed.
78+ *
79+ * Set false to strictly obey line length.
80+ *
81+ *
82+ */
83+ var obeyLineLength: Boolean by OnLayoutProp (false )
84+
7585
7686 /* *
7787 * The total number of statuses to be displayed
@@ -286,6 +296,7 @@ class StatusView @JvmOverloads constructor(
286296 if ((oldHadStrokeFlagSet && ! newHasStrokeFlagSet) || (! oldHadStrokeFlagSet && newHasStrokeFlagSet))
287297 {
288298 requestLayout()
299+
289300 }else {
290301 setDrawingDimensions()
291302 invalidate()
@@ -363,6 +374,7 @@ class StatusView @JvmOverloads constructor(
363374 incompleteDrawable = a.getDrawable(R .styleable.StatusView_incomplete_drawable )
364375 currentDrawable = a.getDrawable(R .styleable.StatusView_current_drawable )
365376 drawLabels = a.getBoolean(R .styleable.StatusView_drawCount , drawLabels)
377+ obeyLineLength = a.getBoolean(R .styleable.StatusView_obeyLineLength , obeyLineLength)
366378 lineGap = a.getDimension(R .styleable.StatusView_lineGap , lineGap)
367379 labelTopMargin = a.getDimension(R .styleable.StatusView_labelTopMargin , labelTopMargin)
368380
@@ -506,10 +518,10 @@ class StatusView @JvmOverloads constructor(
506518 override fun getSuggestedMinimumWidth (): Int {
507519
508520
509- var extraWidth = if (true ){
510- setWidthDataForObeyingStatusText()
511- }else {
521+ var extraWidth = if (obeyLineLength){
512522 setWidthDataForObeyingLineLength()
523+ }else {
524+ setWidthDataForObeyingStatusText()
513525 }
514526
515527 if (isShowingCurrentStatus()){
0 commit comments