Skip to content

Commit

Permalink
Bug: fix font size
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Serrano committed Feb 14, 2022
1 parent 936de97 commit ed4df19
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.21.1 (2022-02-14)

- Fix survey rating numbers hidden when device is set to maximum font size

## 2.21.0 (2021-08-04)

- Add support for EU tokens
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ If you use Maven, you can include this library as a dependency:
<dependency>
<groupId>com.wootric</groupId>
<artifactId>wootric-sdk-android</artifactId>
<version>2.21.0</version>
<version>2.21.1</version>
</dependency>
```

### Using Gradle

```xml
implementation 'com.wootric:wootric-sdk-android:2.21.0'
implementation 'com.wootric:wootric-sdk-android:2.21.1'
```

## Initializing Wootric
Expand Down
4 changes: 2 additions & 2 deletions androidsdk/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_NAME=2.21.0
VERSION_CODE=2210
VERSION_NAME=2.21.1
VERSION_CODE=2211
GROUP=com.wootric

POM_DESCRIPTION=WootricSDK Android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.TextViewCompat;

import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
Expand Down Expand Up @@ -260,6 +264,13 @@ private void updateSelectedScore(int oldScore, int newScore) {

TextView newScoreView = mScoreViews[newScore];
newScoreView.setTextColor(mColorSelected);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
newScoreView.setAutoSizeTextTypeUniformWithConfiguration(
1, 17, 1, TypedValue.COMPLEX_UNIT_DIP);
} else {
TextViewCompat.setAutoSizeTextTypeUniformWithConfiguration(newScoreView, 1, 17, 1,
TypedValue.COMPLEX_UNIT_DIP);
}
newScoreView.setTextSize(ScreenUtils.pxToDp(mScoreTextSizeSelected));
}

Expand Down

0 comments on commit ed4df19

Please sign in to comment.