Skip to content

Commit

Permalink
Fixed the bug of setTextSize & set the minimum SDK lower
Browse files Browse the repository at this point in the history
  • Loading branch information
captainbupt committed Sep 18, 2015
1 parent 6b3f719 commit 79acfd8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CircleProgressView/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
minSdkVersion 14
minSdkVersion 9
targetSdkVersion 22
versionCode 3
versionName "1.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ public int getTextSize() {
*/
public void setTextSize(@IntRange(from = 0) int textSize) {
this.mTextPaint.setTextSize(textSize);
mTextSize = textSize;
mIsAutoTextSize = false;
}

Expand Down
2 changes: 1 addition & 1 deletion ExampleApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {

defaultConfig {
applicationId "at.grabner.circleview"
minSdkVersion 15
minSdkVersion 9
targetSdkVersion 23
versionCode 2
versionName "1.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ protected void onCreate(Bundle savedInstanceState) {
mCircleView.setShowUnit(mShowUnit);

//text sizes
mCircleView.setTextSize(20); // text size set, auto text size off
mCircleView.setUnitSize(15); // if i set the text size i also have to set the unit size
mCircleView.setTextSize(50); // text size set, auto text size off
mCircleView.setUnitSize(40); // if i set the text size i also have to set the unit size
mCircleView.setAutoTextSize(true); // enable auto text size, previous values are overwritten
//if you want the calculated text sizes to be bigger/smaller you can do so via
mCircleView.setUnitScale(0.9f);
Expand Down

0 comments on commit 79acfd8

Please sign in to comment.