@@ -151,9 +151,10 @@ class StatusView @JvmOverloads constructor(
151151 /* *
152152 * Stroke width of the line between circles (dp)
153153 */
154- var lineStrokeWidth: Float by OnValidateProp (2.0f .pxValue()) {
154+ var lineStrokeWidth: Float by OnValidateProp (1.5f .pxValue()) {
155155 mLinePaint.strokeWidth = lineStrokeWidth
156156 mLinePaintIncomplete.strokeWidth = lineStrokeWidth
157+ mLinePaintCurrent.strokeWidth = lineStrokeWidth
157158 }
158159
159160 /* *
@@ -413,51 +414,52 @@ class StatusView @JvmOverloads constructor(
413414 init {
414415
415416
416- val a = context.theme.obtainStyledAttributes(attrs, R .styleable.StatusView , 0 , 0 )
417+ val a = context.theme.obtainStyledAttributes(attrs, R .styleable.StatusViewScroller , 0 , 0 )
417418
418419 try {
419420
420- statusCount = a.getInt(R .styleable.StatusView_statusCount , statusCount)
421- currentCount = a.getInt(R .styleable.StatusView_currentCount , INVALID_STATUS_COUNT )
422- circleRadius = a.getDimension(R .styleable.StatusView_circleRadius , circleRadius)
423- lineLength = a.getDimension(R .styleable.StatusView_lineLength , lineLength)
424- circleStrokeWidth = a.getDimension(R .styleable.StatusView_circleStrokeWidth , circleStrokeWidth)
425- lineStrokeWidth = a.getDimension(R .styleable.StatusView_lineWidth , lineStrokeWidth)
426- completeDrawable = a.getDrawable(R .styleable.StatusView_complete_drawable )
427- incompleteDrawable = a.getDrawable(R .styleable.StatusView_incomplete_drawable )
428- currentDrawable = a.getDrawable(R .styleable.StatusView_current_drawable )
429- drawLabels = a.getBoolean(R .styleable.StatusView_drawCount , drawLabels)
430- obeyLineLength = a.getBoolean(R .styleable.StatusView_obeyLineLength , obeyLineLength)
431- lineGap = a.getDimension(R .styleable.StatusView_lineGap , lineGap)
432- minMarginStatusText = a.getDimension(R .styleable.StatusView_minStatusMargin , minMarginStatusText)
433- labelTopMargin = a.getDimension(R .styleable.StatusView_labelTopMargin , labelTopMargin)
434- lineColor = a.getColor(R .styleable.StatusView_lineColor , lineColor)
435- circleFillColor = a.getColor(R .styleable.StatusView_circleColor , circleFillColor)
436- circleStrokeColor = a.getColor(R .styleable.StatusView_circleStrokeColor , circleStrokeColor)
437- textColorStatus = a.getColor(R .styleable.StatusView_textColor , textColorStatus)
438- textColorLabels = a.getColor(R .styleable.StatusView_textColorLabels , textColorLabels)
439- textSizeStatus = a.getDimension(R .styleable.StatusView_textSize , textSizeStatus)
440- textSizeLabels = a.getDimension(R .styleable.StatusView_textSizeLabels , textSizeLabels)
441- circleColorType = a.getInteger(R .styleable.StatusView_circleColorType , circleColorType)
442- textColorLabelsIncomplete = a.getColor(R .styleable.StatusView_textColorLabelsIncomplete , textColorStatus)
443- textColorLabelCurrent = a.getColor(R .styleable.StatusView_textColorLabelsCurrent , textColorLabelCurrent)
444- lineColorIncomplete = a.getColor(R .styleable.StatusView_lineColorIncomplete , lineColorIncomplete)
445- lineColorCurrent= a.getColor(R .styleable.StatusView_lineColorCurrent , lineColorCurrent)
446- circleFillColorIncomplete = a.getColor(R .styleable.StatusView_circleColorIncomplete , circleFillColor)
447- circleStrokeColorIncomplete = a.getColor(R .styleable.StatusView_circleStrokeColorIncomplete , circleStrokeColor)
448- circleFillColorCurrent = a.getColor(R .styleable.StatusView_circleColorCurrent , circleFillColorIncomplete)
449- currentStatusZoom = a.getFloat(R .styleable.StatusView_currentStatusZoom , currentStatusZoom)
450- alignStatusWithCurrent = a.getBoolean(R .styleable.StatusView_alignStatusWithCurrent , alignStatusWithCurrent)
451-
452- val entries = a.getTextArray(R .styleable.StatusView_android_entries )
421+ statusCount = a.getInt(R .styleable.StatusViewScroller_statusCount , statusCount)
422+ currentCount = a.getInt(R .styleable.StatusViewScroller_currentCount , INVALID_STATUS_COUNT )
423+ circleRadius = a.getDimension(R .styleable.StatusViewScroller_circleRadius , circleRadius)
424+ lineLength = a.getDimension(R .styleable.StatusViewScroller_lineLength , lineLength)
425+ circleStrokeWidth = a.getDimension(R .styleable.StatusViewScroller_circleStrokeWidth , circleStrokeWidth)
426+ lineStrokeWidth = a.getDimension(R .styleable.StatusViewScroller_lineWidth , lineStrokeWidth)
427+ completeDrawable = a.getDrawable(R .styleable.StatusViewScroller_complete_drawable )
428+ incompleteDrawable = a.getDrawable(R .styleable.StatusViewScroller_incomplete_drawable )
429+ currentDrawable = a.getDrawable(R .styleable.StatusViewScroller_current_drawable )
430+ drawLabels = a.getBoolean(R .styleable.StatusViewScroller_drawCount , drawLabels)
431+ obeyLineLength = a.getBoolean(R .styleable.StatusViewScroller_obeyLineLength , obeyLineLength)
432+ lineGap = a.getDimension(R .styleable.StatusViewScroller_lineGap , lineGap)
433+ minMarginStatusText = a.getDimension(R .styleable.StatusViewScroller_minStatusMargin , minMarginStatusText)
434+ labelTopMargin = a.getDimension(R .styleable.StatusViewScroller_labelTopMargin , labelTopMargin)
435+ lineColor = a.getColor(R .styleable.StatusViewScroller_lineColor , lineColor)
436+ circleFillColor = a.getColor(R .styleable.StatusViewScroller_circleColor , circleFillColor)
437+ circleStrokeColor = a.getColor(R .styleable.StatusViewScroller_circleStrokeColor , circleStrokeColor)
438+ textColorStatus = a.getColor(R .styleable.StatusViewScroller_textColor , textColorStatus)
439+ textColorLabels = a.getColor(R .styleable.StatusViewScroller_textColorLabels , textColorLabels)
440+ textSizeStatus = a.getDimension(R .styleable.StatusViewScroller_textSize , textSizeStatus)
441+ textSizeLabels = a.getDimension(R .styleable.StatusViewScroller_textSizeLabels , textSizeLabels)
442+ circleColorType = a.getInteger(R .styleable.StatusViewScroller_circleColorType , circleColorType)
443+ textColorLabelsIncomplete = a.getColor(R .styleable.StatusViewScroller_textColorLabelsIncomplete , textColorLabels)
444+ textColorLabelCurrent = a.getColor(R .styleable.StatusViewScroller_textColorLabelsCurrent , textColorLabelsIncomplete)
445+ lineColorIncomplete = a.getColor(R .styleable.StatusViewScroller_lineColorIncomplete , lineColor)
446+ lineColorCurrent= a.getColor(R .styleable.StatusViewScroller_lineColorCurrent , lineColorIncomplete)
447+ circleFillColorIncomplete = a.getColor(R .styleable.StatusViewScroller_circleColorIncomplete , circleFillColor)
448+ circleStrokeColorIncomplete = a.getColor(R .styleable.StatusViewScroller_circleStrokeColorIncomplete , circleStrokeColor)
449+ circleStrokeColorCurrent = a.getColor(R .styleable.StatusViewScroller_circleStrokeColorCurrent , circleStrokeColorIncomplete)
450+ circleFillColorCurrent = a.getColor(R .styleable.StatusViewScroller_circleColorCurrent , circleFillColorIncomplete)
451+ currentStatusZoom = a.getFloat(R .styleable.StatusViewScroller_currentStatusZoom , currentStatusZoom)
452+ alignStatusWithCurrent = a.getBoolean(R .styleable.StatusViewScroller_alignStatusWithCurrent , alignStatusWithCurrent)
453+
454+ val entries = a.getTextArray(R .styleable.StatusViewScroller_android_entries )
453455 if (entries != null ) {
454456 for (entry in entries){
455457 statusData.add(StatusInfo (entry.toString()))
456458 }
457459 }
458460
459461 try {
460- val resource: Int = a.getResourceId(R .styleable.StatusView_statusFont , - 1 )
462+ val resource: Int = a.getResourceId(R .styleable.StatusViewScroller_statusFont , - 1 )
461463 if (resource != - 1 ) {
462464 statusTypeface = ResourcesCompat .getFont(getContext(), resource)
463465 }
@@ -466,7 +468,7 @@ class StatusView @JvmOverloads constructor(
466468 }
467469
468470 try {
469- val resource: Int = a.getResourceId(R .styleable.StatusView_labelFont , - 1 )
471+ val resource: Int = a.getResourceId(R .styleable.StatusViewScroller_labelFont , - 1 )
470472 if (resource != - 1 ) {
471473 labelsTypeface = ResourcesCompat .getFont(getContext(), resource)
472474 }
0 commit comments