From 9ad24ef94d41a33b5d10e8ce0340114d4f71f887 Mon Sep 17 00:00:00 2001 From: RD Rama Devi <122200035+Rd4dev@users.noreply.github.com> Date: Tue, 9 Jan 2024 23:35:08 +0530 Subject: [PATCH] Fix All warnings in "Usability:Typography", "Usability:Icons", and "Usability" categories (#5196) ## Explanation Fixes #5194 [part of #5182] Fixes all warning in "Usability" category caused by - **Borderless Buttons :** Fixed by introducing `style="?android:attr/buttonBarButtonStyle"` to the borderless buttons - **OK text capitalization :** Fixed by suppressing the lint warnings for `ButtonCase` and `Typos` - **Ellipsis/Hyphen unicode replacement :** Fixed by introducing unicode representations (under review) - **Image in density drawable folder :** Fixed by creating seperate density images (under review) - **Text size too small :** Fixed by upscaling text size to `12sp` - **To incorporate Autofill :** Fixed by incorporating `autofillHints` to the EditText ## ScreenShot ![Before After Usability Lint Issues](https://github.com/oppia/oppia-android/assets/122200035/5a7037f5-ca22-482a-a0f3-8af2bfc8b75c) ## Essential Checklist - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). --------- Co-authored-by: Adhiambo Peres <59600948+adhiamboperes@users.noreply.github.com> Co-authored-by: Ben Henning --- .../review_placeholder.png | Bin .../testing_fraction.png | Bin .../topic_fractions_01.png | Bin .../topic_fractions_02.png | Bin .../topic_fractions_03.png | Bin .../topic_fractions_04.png | Bin .../topic_fractions_05.png | Bin .../topic_fractions_06.png | Bin .../topic_fractions_07.png | Bin .../topic_fractions_08.png | Bin .../topic_ratios_01.png | Bin .../topic_lessons_story_summary.xml | 2 +- .../concept_card_fragment_test_activity.xml | 2 ++ .../res/layout/survey_free_form_layout.xml | 3 ++- .../res/layout/topic_lessons_story_summary.xml | 2 +- .../res/mipmap-anydpi-v26/launcher_icon.xml | 17 +++++++++++++++++ app/src/main/res/values-ar/strings.xml | 6 +++--- app/src/main/res/values-pt-rBR/strings.xml | 2 +- app/src/main/res/values/strings.xml | 14 +++++++------- 19 files changed, 34 insertions(+), 14 deletions(-) rename app/src/main/res/{drawable => drawable-nodpi}/review_placeholder.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/testing_fraction.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/topic_fractions_01.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/topic_fractions_02.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/topic_fractions_03.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/topic_fractions_04.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/topic_fractions_05.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/topic_fractions_06.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/topic_fractions_07.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/topic_fractions_08.png (100%) rename app/src/main/res/{drawable => drawable-nodpi}/topic_ratios_01.png (100%) diff --git a/app/src/main/res/drawable/review_placeholder.png b/app/src/main/res/drawable-nodpi/review_placeholder.png similarity index 100% rename from app/src/main/res/drawable/review_placeholder.png rename to app/src/main/res/drawable-nodpi/review_placeholder.png diff --git a/app/src/main/res/drawable/testing_fraction.png b/app/src/main/res/drawable-nodpi/testing_fraction.png similarity index 100% rename from app/src/main/res/drawable/testing_fraction.png rename to app/src/main/res/drawable-nodpi/testing_fraction.png diff --git a/app/src/main/res/drawable/topic_fractions_01.png b/app/src/main/res/drawable-nodpi/topic_fractions_01.png similarity index 100% rename from app/src/main/res/drawable/topic_fractions_01.png rename to app/src/main/res/drawable-nodpi/topic_fractions_01.png diff --git a/app/src/main/res/drawable/topic_fractions_02.png b/app/src/main/res/drawable-nodpi/topic_fractions_02.png similarity index 100% rename from app/src/main/res/drawable/topic_fractions_02.png rename to app/src/main/res/drawable-nodpi/topic_fractions_02.png diff --git a/app/src/main/res/drawable/topic_fractions_03.png b/app/src/main/res/drawable-nodpi/topic_fractions_03.png similarity index 100% rename from app/src/main/res/drawable/topic_fractions_03.png rename to app/src/main/res/drawable-nodpi/topic_fractions_03.png diff --git a/app/src/main/res/drawable/topic_fractions_04.png b/app/src/main/res/drawable-nodpi/topic_fractions_04.png similarity index 100% rename from app/src/main/res/drawable/topic_fractions_04.png rename to app/src/main/res/drawable-nodpi/topic_fractions_04.png diff --git a/app/src/main/res/drawable/topic_fractions_05.png b/app/src/main/res/drawable-nodpi/topic_fractions_05.png similarity index 100% rename from app/src/main/res/drawable/topic_fractions_05.png rename to app/src/main/res/drawable-nodpi/topic_fractions_05.png diff --git a/app/src/main/res/drawable/topic_fractions_06.png b/app/src/main/res/drawable-nodpi/topic_fractions_06.png similarity index 100% rename from app/src/main/res/drawable/topic_fractions_06.png rename to app/src/main/res/drawable-nodpi/topic_fractions_06.png diff --git a/app/src/main/res/drawable/topic_fractions_07.png b/app/src/main/res/drawable-nodpi/topic_fractions_07.png similarity index 100% rename from app/src/main/res/drawable/topic_fractions_07.png rename to app/src/main/res/drawable-nodpi/topic_fractions_07.png diff --git a/app/src/main/res/drawable/topic_fractions_08.png b/app/src/main/res/drawable-nodpi/topic_fractions_08.png similarity index 100% rename from app/src/main/res/drawable/topic_fractions_08.png rename to app/src/main/res/drawable-nodpi/topic_fractions_08.png diff --git a/app/src/main/res/drawable/topic_ratios_01.png b/app/src/main/res/drawable-nodpi/topic_ratios_01.png similarity index 100% rename from app/src/main/res/drawable/topic_ratios_01.png rename to app/src/main/res/drawable-nodpi/topic_ratios_01.png diff --git a/app/src/main/res/layout-sw600dp-land/topic_lessons_story_summary.xml b/app/src/main/res/layout-sw600dp-land/topic_lessons_story_summary.xml index cd483e4b25e..9da30566990 100644 --- a/app/src/main/res/layout-sw600dp-land/topic_lessons_story_summary.xml +++ b/app/src/main/res/layout-sw600dp-land/topic_lessons_story_summary.xml @@ -86,7 +86,7 @@ android:fontFamily="sans-serif" android:text="@{viewModel.storyPercentage != 100? @string/status_in_progress : @string/status_completed}" android:textColor="@color/component_color_shared_primary_text_color" - android:textSize="10sp" + android:textSize="12sp" android:visibility="@{viewModel.storyPercentage != 0 ? View.VISIBLE : View.GONE}" /> diff --git a/app/src/main/res/layout/concept_card_fragment_test_activity.xml b/app/src/main/res/layout/concept_card_fragment_test_activity.xml index 9f8586d5570..79e5d51f9a2 100644 --- a/app/src/main/res/layout/concept_card_fragment_test_activity.xml +++ b/app/src/main/res/layout/concept_card_fragment_test_activity.xml @@ -7,6 +7,7 @@ android:id="@+id/open_dialog_0" android:layout_width="wrap_content" android:layout_height="wrap_content" + style="?android:attr/buttonBarButtonStyle" android:text="@string/concept_card_one_button_text" android:textAllCaps="false"/> @@ -14,6 +15,7 @@ android:id="@+id/open_dialog_1" android:layout_width="wrap_content" android:layout_height="wrap_content" + style="?android:attr/buttonBarButtonStyle" android:text="@string/concept_card_two_button_text" android:textAllCaps="false" /> diff --git a/app/src/main/res/layout/survey_free_form_layout.xml b/app/src/main/res/layout/survey_free_form_layout.xml index fb915d5a13c..6e038e92462 100644 --- a/app/src/main/res/layout/survey_free_form_layout.xml +++ b/app/src/main/res/layout/survey_free_form_layout.xml @@ -24,7 +24,8 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:textChangedListener="@{viewModel.answerTextWatcher}" /> + app:textChangedListener="@{viewModel.answerTextWatcher}" + android:autofillHints="@string/survey_free_form_text_hint" />