Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
fix updating a custom typeface in java
Browse files Browse the repository at this point in the history
  • Loading branch information
shuhart committed Feb 4, 2018
1 parent 2617b19 commit 5d597b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Usage
-----

1. Add jcenter() to repositories block in your gradle file.
2. Add `compile 'com.shuhart.stepview:stepview:1.2.1'` to your dependencies.
2. Add `compile 'com.shuhart.stepview:stepview:1.2.2'` to your dependencies.
3. Add `StepView` into your layouts or view hierarchy.

Supported animations:
Expand Down Expand Up @@ -106,7 +106,7 @@ If you want to allow going back after that, you should unmark the done state:
```java
stepView.done(false)
```
See a sample for additional details.
See the sample for additional details.

If you want a custom typeface you should add font files to the resource folder "font" and reference any in xml layout.
Alternatively you can specify typeface using the state builder in your code. Look into the sample for additional details on that.
Expand Down
2 changes: 1 addition & 1 deletion stepview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ext {
siteUrl = 'https://github.com/shuhart/StepView'
gitUrl = 'https://github.com/shuhart/StepView.git'

libraryVersion = '1.2.1'
libraryVersion = '1.2.2'

developerId = 'shuhart'
developerName = 'Redrick Shuhart'
Expand Down
2 changes: 1 addition & 1 deletion stepview/src/main/java/com/shuhart/stepview/StepView.java
Original file line number Diff line number Diff line change
Expand Up @@ -759,14 +759,14 @@ public void commit() {
StepView.this.stepNumberTextSize = stepNumberTextSize;
StepView.this.doneStepMarkColor = doneStepMarkColor;
StepView.this.animationDuration = animationDuration;
paint.setTypeface(typeface);
if (steps != null && !StepView.this.steps.equals(steps)) {
StepView.this.setSteps(steps);
} else if (stepsNumber != 0 && stepsNumber != StepView.this.stepsNumber) {
StepView.this.setStepsNumber(stepsNumber);
} else {
StepView.this.invalidate();
}
paint.setTypeface(typeface);
}
}
}

0 comments on commit 5d597b4

Please sign in to comment.