Fix failing tests for updateDepictsProperty method (#5795)

* tests: fix failing testUpdateDepictsProperty

* replace deprecated circular progress bar with material progress bar

* refactor: update SettingsActivity to not use custom appCompatDeletegate

It is required because that delegate is automatically handled in new libraries.
This commit is contained in:
Rohit Verma 2024-08-28 11:59:16 +05:30 committed by GitHub
parent ec4a6bc0c4
commit 190135d36c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 107 additions and 84 deletions

View file

@ -65,10 +65,10 @@ public class QuizResultActivity extends AppCompatActivity {
* @param score
*/
public void setScore(int score) {
int per = score * MULTIPLIER_TO_GET_PERCENTAGE;
binding.resultProgressBar.setProgress(per);
binding.resultProgressBar.setProgressTextFormatPattern(score +" / " + NUMBER_OF_QUESTIONS);
String message = getResources().getString(R.string.congratulatory_message_quiz,per + "%");
final int scorePercent = score * MULTIPLIER_TO_GET_PERCENTAGE;
binding.resultProgressBar.setProgress(scorePercent);
binding.tvResultProgress.setText(score +" / " + NUMBER_OF_QUESTIONS);
final String message = getResources().getString(R.string.congratulatory_message_quiz,scorePercent + "%");
binding.congratulatoryMessage.setText(message);
}