Skip to content

Commit fcbe231

Browse files
committed
bug fixed
1 parent 8bd26e0 commit fcbe231

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A progress bar for my ongoing project.
1010
via Gradle:
1111

1212
dependencies {
13-
compile 'com.zekapp.library:progreswheelview:1.1.3'
13+
compile 'com.zekapp.library:progreswheelview:1.1.4'
1414
}
1515

1616
## Usage of Dial progress bar

app/src/main/res/layout/content_main.xml

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
app:countTextSize="20sp"
2424
app:defTextColor="@android:color/black"
2525
app:defTextSize="10sp"
26-
app:definitionText="Steps"
2726
app:percentage="90"
2827
app:progressColor="#64b324"/>
2928

progreswheelview/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33

4-
def libVer = '1.1.3'
4+
def libVer = '1.1.4'
55

66
ext {
77
bintrayRepo = 'Maven'

progreswheelview/src/main/java/com/app/progresviews/ProgressWheel.kt

+2-3
Original file line numberDiff line numberDiff line change
@@ -182,19 +182,18 @@ class ProgressWheel : View {
182182
canvas.drawArc(mRimBounds, 0f, 360f, false, mCirclePaint)
183183
canvas.drawArc(mProgressBounds, -90f, mPercentage.toFloat(), false, mBarPaint)
184184

185-
val horizontalCountTextOffset = mCountTextPaint.measureText(mCountText) / 2
186-
187185
if (mCountText != null){
186+
val horizontalCountTextOffset = mCountTextPaint.measureText(mCountText) / 2
188187
canvas.drawText(mCountText!!,
189188
this.width / 2 - horizontalCountTextOffset,
190189
(this.height / 2).toFloat() + if (mDefText == null) mCountTextSize/2 else 0f,
191190
mCountTextPaint
192191
)
193192
}
194193

195-
val horizontalDefTextOffset = mDefTextPaint.measureText(mDefText) / 2
196194

197195
if (mDefText != null){
196+
val horizontalDefTextOffset = mDefTextPaint.measureText(mDefText) / 2
198197
canvas.drawText(mDefText!!,
199198
this.width / 2 - horizontalDefTextOffset,
200199
(this.height / 2).toFloat() + mCountTextHeight + mMarginBtwTexts,

0 commit comments

Comments
 (0)