Skip to content

Commit

Permalink
Set stroke cap works dynamically.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanClarifruit committed Apr 24, 2019
1 parent 74cb73d commit 5b4b1ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ public String getStrokeCap() {

public void setStrokeCap(String strokeCap) {
mStrokeCap = strokeCap;
if(mPaint != null) {
if (mStrokeCap.equals("BUTT")) {
mPaint.setStrokeCap(Paint.Cap.BUTT);
} else if (mStrokeCap.equals("ROUND")) {
mPaint.setStrokeCap(Paint.Cap.ROUND);
}
}
}

@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public void run() {
gauge3.setValue(i);
text1.setText(Integer.toString(gauge1.getEndValue()));
text2.setText(Integer.toString(gauge2.getEndValue()));
gauge3.setDividerSize(3);
}
});
Thread.sleep(50);
Expand Down

0 comments on commit 5b4b1ac

Please sign in to comment.