Reformat source code

pull/1929/head
Alinson S. Xavier 2 years ago
parent 45a82b3c2d
commit 248ba50a8e
Signed by: isoron
GPG Key ID: 0DA8E4B9E1109DCA

@ -157,7 +157,7 @@ class RingView : View {
pRing!!.xfermode = XFERMODE_CLEAR
} else {
pRing!!.color =
backgroundColor!!
backgroundColor!!
}
rect!!.inset(thickness, thickness)
activeCanvas.drawArc(rect!!, 0f, 360f, true, pRing!!)
@ -165,17 +165,17 @@ class RingView : View {
pRing!!.color = color
pRing!!.textSize = textSize
if (isStrokedTextEnabled){
if (isStrokedTextEnabled) {
pRing!!.style = Paint.Style.STROKE
pRing!!.strokeWidth = textSize / 15f
}
if (enableFontAwesome) pRing!!.typeface = getFontAwesome(context)
activeCanvas.drawText(
text!!,
rect!!.centerX(),
rect!!.centerY() + 0.4f * em,
pRing!!
text!!,
rect!!.centerX(),
rect!!.centerY() + 0.4f * em,
pRing!!
)
}
if (activeCanvas !== canvas) canvas.drawBitmap(internalDrawingCache!!, 0f, 0f, null)

@ -146,14 +146,14 @@ class CheckmarkWidgetView : HabitWidgetView {
}
ring.setThickness(0.03f * width)
super.onMeasure(
MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)
MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)
)
}
private fun init() {
val appComponent: HabitsApplicationComponent =
(context.applicationContext as HabitsApplication).component
(context.applicationContext as HabitsApplication).component
preferences = appComponent.preferences
ring = findViewById<View>(R.id.scoreRing) as RingView
label = findViewById<View>(R.id.label) as TextView

Loading…
Cancel
Save