diff --git a/CHANGELOG.md b/CHANGELOG.md index f4263be..02e53ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.24.3 (2023-05-12) + +- Fix getScoreColor bug + ## 2.24.2 (2023-03-27) - Fix crash after stopping a survey diff --git a/README.md b/README.md index 08e737a..b8815c7 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,14 @@ If you use Maven, you can include this library as a dependency: com.wootric wootric-sdk-android - 2.24.2 + 2.24.3 ``` ### Using Gradle ```xml -implementation 'com.wootric:wootric-sdk-android:2.24.2' +implementation 'com.wootric:wootric-sdk-android:2.24.3' ``` ## Initializing Wootric diff --git a/androidsdk/gradle.properties b/androidsdk/gradle.properties index 00af601..f9c69ef 100644 --- a/androidsdk/gradle.properties +++ b/androidsdk/gradle.properties @@ -1,5 +1,5 @@ -VERSION_NAME=2.24.2 -VERSION_CODE=2242 +VERSION_NAME=2.24.3 +VERSION_CODE=2243 GROUP=com.wootric POM_DESCRIPTION=WootricSDK Android diff --git a/androidsdk/src/main/java/com/wootric/androidsdk/views/phone/SurveyLayoutPhone.java b/androidsdk/src/main/java/com/wootric/androidsdk/views/phone/SurveyLayoutPhone.java index 38d838e..2bf6dcd 100644 --- a/androidsdk/src/main/java/com/wootric/androidsdk/views/phone/SurveyLayoutPhone.java +++ b/androidsdk/src/main/java/com/wootric/androidsdk/views/phone/SurveyLayoutPhone.java @@ -165,9 +165,18 @@ private void initViews() { mDriverPicklist = (DriverPicklist) mLayoutBody.findViewById(R.id.wootric_driver_picklist); selectedAnswers = new HashMap<>(); + try { + Resources res = mContext.getResources(); + mColorSelected = res.getColor(mSettings.getScoreColor()); + mColorEnabled = res.getColor(mSettings.getSurveyColor()); + } catch(Exception e) { + mColorSelected = mSettings.getScoreColor(); + mColorEnabled = mSettings.getSurveyColor(); + } + new DriverPicklist.Configure() .driverPicklist(mDriverPicklist) - .selectedColor(mContext.getResources().getColor(mSettings.getScoreColor())) + .selectedColor(mColorSelected) .selectedFontColor(Color.parseColor("#ffffff")) .deselectedColor(Color.parseColor("#ffffff")) .deselectedFontColor(Color.parseColor("#253746")) @@ -397,14 +406,6 @@ private void setTexts() { } private void setColors() { - try { - Resources res = mContext.getResources(); - mColorSelected = res.getColor(mSettings.getScoreColor()); - mColorEnabled = res.getColor(mSettings.getSurveyColor()); - } catch(Exception e) { - mColorSelected = mSettings.getScoreColor(); - mColorEnabled = mSettings.getSurveyColor(); - } mRatingBar.setSelectedColor(mColorSelected); mBtnDismiss.setTextColor(mColorEnabled);