Skip to content

Commit

Permalink
Fix #5171: Fixes all warnings in "Accessibility" category (#5173)
Browse files Browse the repository at this point in the history
<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->

Fixes #5171

Under this category, the warnings are mainly of 3 types:

1. Warning: Image without contentDescription.
Fix: Add a `contentDescription` to each of those `ImageView`, or mark as
not important for accessibility.

2. Warning: 'onTouch' lambda should call 'View#performClick' when a
click is detected
Fix: Call `customView.performClick( )`.

3. Warning: 'clickable' attribute found, please also add 'focusable'.
Fix: Set `android:focusable="true"` as its necessary if
`android:clickable="true"`.


![image](https://github.com/oppia/oppia-android/assets/84731134/894a6fb3-632b-4397-bc80-16b60d06f5f2)

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [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)).

## For UI-specific PRs only
<!-- Delete these section if this PR does not include UI-related
changes. -->
If your PR includes UI-related changes, then:
- Add screenshots for portrait/landscape for both a tablet & phone of
the before & after UI changes
- For the screenshots above, include both English and pseudo-localized
(RTL) screenshots (see [RTL
guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines))
- Add a video showing the full UX flow with a screen reader enabled (see
[accessibility
guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide))
- Add a screenshot demonstrating that you ran affected Espresso tests
locally & that they're passing

---------

Co-authored-by: Adhiambo Peres <[email protected]>
  • Loading branch information
theMr17 and adhiamboperes authored Oct 5, 2023
1 parent 3103b0c commit 8aefb05
Show file tree
Hide file tree
Showing 37 changed files with 110 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ class ImageRegionSelectionInteractionView @JvmOverloads constructor(
maybeInitializeClickableAreas()
}

override fun performClick(): Boolean {
return super.performClick()
}

fun setOnRegionClicked(onRegionClicked: OnClickableAreaClickedListener) {
this.onRegionClicked = onRegionClicked
maybeInitializeClickableAreas()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class ClickableAreasImage(
if (motionEvent.action == MotionEvent.ACTION_DOWN) {
onPhotoTap(motionEvent.x, motionEvent.y)
}
view.performClick()
return@setOnTouchListener false
}
}
Expand Down Expand Up @@ -110,10 +111,11 @@ class ClickableAreasImage(
newView.isFocusable = true
newView.isFocusableInTouchMode = true
newView.tag = clickableArea.label
newView.setOnTouchListener { _, event ->
newView.setOnTouchListener { view, event ->
if (event.action == MotionEvent.ACTION_DOWN) {
showOrHideRegion(newView, clickableArea)
}
view.performClick()
return@setOnTouchListener true
}
if (isAccessibilityEnabled) {
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout-land/profile_chooser_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_language_icon_grey_24dp" />
app:srcCompat="@drawable/ic_language_icon_grey_24dp"
android:contentDescription="@string/language_icon_content_description" />

<TextView
style="@style/Subtitle1ViewCenter"
Expand Down Expand Up @@ -115,7 +116,8 @@
android:paddingTop="12dp"
android:paddingEnd="16dp"
android:paddingBottom="12dp"
app:srcCompat="@drawable/ic_settings_grey_48dp" />
app:srcCompat="@drawable/ic_settings_grey_48dp"
android:contentDescription="@string/setting_icon_content_description" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout-land/topic_info_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/see_more_text_view"
app:srcCompat="@{viewModel.downloadStatusIndicatorDrawableResourceId, default=@drawable/ic_available_offline_primary_24dp}"
app:tint="@color/component_color_topic_info_fragment_download_status_image_color" />
app:tint="@color/component_color_topic_info_fragment_download_status_image_color"
android:contentDescription="@string/download_status_image_content_description" />

<TextView
android:id="@+id/download_story_count_text_view"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout-land/walkthrough_final_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_portrait_onboarding_0" />
app:srcCompat="@drawable/ic_portrait_onboarding_0"
android:importantForAccessibility="no" />

<LinearLayout
android:id="@+id/walkthrough_button_container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_portrait_onboarding_0" />
app:srcCompat="@drawable/ic_portrait_onboarding_0"
android:importantForAccessibility="no" />

<Button
android:id="@+id/walkthrough_welcome_next_button"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout-sw600dp-land/topic_info_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/see_more_text_view"
app:srcCompat="@{viewModel.downloadStatusIndicatorDrawableResourceId, default=@drawable/ic_available_offline_primary_24dp}"
app:tint="@color/component_color_topic_info_fragment_download_status_image_color" />
app:tint="@color/component_color_topic_info_fragment_download_status_image_color"
android:contentDescription="@string/download_status_image_content_description" />

<TextView
android:id="@+id/download_story_count_text_view"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout-sw600dp-port/topic_info_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/see_more_text_view"
app:srcCompat="@{viewModel.downloadStatusIndicatorDrawableResourceId, default=@drawable/ic_available_offline_primary_24dp}"
app:tint="@color/component_color_topic_info_fragment_download_status_image_color" />
app:tint="@color/component_color_topic_info_fragment_download_status_image_color"
android:contentDescription="@string/download_status_image_content_description" />

<TextView
android:id="@+id/download_story_count_text_view"
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout-sw600dp/profile_chooser_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_language_icon_grey_24dp" />
app:srcCompat="@drawable/ic_language_icon_grey_24dp"
android:contentDescription="@string/language_icon_content_description" />

<TextView
style="@style/Subtitle1ViewCenter"
Expand Down Expand Up @@ -119,7 +120,8 @@
android:layout_height="48dp"
android:layout_marginEnd="@dimen/profile_chooser_setting_icon_margin_end"
android:padding="8dp"
app:srcCompat="@drawable/ic_settings_grey_48dp" />
app:srcCompat="@drawable/ic_settings_grey_48dp"
android:contentDescription="@string/setting_icon_content_description" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout-sw600dp/story_chapter_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
app:layout_constraintEnd_toEndOf="@id/chapter_thumbnail"
app:layout_constraintStart_toStartOf="@id/chapter_thumbnail"
app:layout_constraintTop_toTopOf="@id/chapter_thumbnail"
app:srcCompat="@drawable/ic_baseline_lock_24" />
app:srcCompat="@drawable/ic_baseline_lock_24"
android:contentDescription="@string/lock_icon_content_description" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:layout_height="48dp"
android:layout_gravity="center_vertical"
android:padding="8dp"
app:srcCompat="@drawable/ic_arrow_drop_down_black_24dp" />
app:srcCompat="@drawable/ic_arrow_drop_down_black_24dp"
android:importantForAccessibility="no" />
</FrameLayout>
</layout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/app_version_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/app_last_update_date_text_view"
app:srcCompat="@drawable/ic_info_icon_gray_24dp"
app:tint="@color/component_color_app_version_activity_info_icon_color" />
app:tint="@color/component_color_app_version_activity_info_icon_color"
android:contentDescription="@string/app_info_icon_content_description" />

<TextView
android:id="@+id/app_last_update_date_text_view"
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/bottom_left_overlay.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_rounded_arrow_up_right"
app:tint="@color/component_color_shared_spotlight_overlay_arrow_color" />
app:tint="@color/component_color_shared_spotlight_overlay_arrow_color"
android:contentDescription="@string/spotlight_overlay_arrow_content_description" />

<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
Expand Down Expand Up @@ -70,7 +71,8 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_close_black_24"
app:tint="@color/component_color_shared_close_spotlight_button_color" />
app:tint="@color/component_color_shared_close_spotlight_button_color"
android:contentDescription="@string/close_spotlight_button_content_description" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/bottom_right_overlay.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_rounded_arrow_up_right"
app:tint="@color/component_color_shared_spotlight_overlay_arrow_color" />
app:tint="@color/component_color_shared_spotlight_overlay_arrow_color"
android:contentDescription="@string/spotlight_overlay_arrow_content_description" />

<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
Expand Down Expand Up @@ -71,7 +72,8 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_close_black_24"
app:tint="@color/component_color_shared_close_spotlight_button_color" />
app:tint="@color/component_color_shared_close_spotlight_button_color"
android:contentDescription="@string/close_spotlight_button_content_description" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/continue_interaction_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/component_color_shared_back_forward_arrow_button_color" />
app:tint="@color/component_color_shared_back_forward_arrow_button_color"
android:contentDescription="@string/previous_state_navigation_button_content_description" />

<org.oppia.android.app.customview.ContinueButtonView
android:id="@+id/continue_interaction_button"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/continue_navigation_button_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/component_color_shared_back_forward_arrow_button_color" />
app:tint="@color/component_color_shared_back_forward_arrow_button_color"
android:contentDescription="@string/previous_state_navigation_button_content_description" />

<org.oppia.android.app.customview.ContinueButtonView
android:id="@+id/continue_navigation_button"
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/drawer_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
android:layout_height="24dp"
android:layout_gravity="center_vertical"
app:srcCompat="@drawable/ic_baseline_code_24"
android:tint="@{footerViewModel.isDeveloperOptionsSelected ? @color/component_color_drawer_fragment_developer_options_selected_image_color : @color/component_color_shared_primary_dark_text_color}" />
android:tint="@{footerViewModel.isDeveloperOptionsSelected ? @color/component_color_drawer_fragment_developer_options_selected_image_color : @color/component_color_shared_primary_dark_text_color}"
android:contentDescription="@string/developer_options_icon_content_description" />

<TextView
android:layout_width="match_parent"
Expand Down Expand Up @@ -98,7 +99,8 @@
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:tint="@{footerViewModel.isAdministratorControlsSelected ? @color/component_color_drawer_fragment_admin_controls_selected_image_color : @color/component_color_shared_primary_dark_text_color}"
app:srcCompat="@drawable/ic_admin_settings_icon_brown_24dp" />
app:srcCompat="@drawable/ic_admin_settings_icon_brown_24dp"
android:contentDescription="@string/administrator_controls_icon_content_description" />

<TextView
android:layout_width="match_parent"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/exploration_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
android:layout_gravity="end"
android:minWidth="48dp"
android:minHeight="48dp"
android:scaleType="center" />
android:scaleType="center"
android:contentDescription="@string/options_menu_content_description" />
</LinearLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
android:background="@drawable/state_button_primary_background"
android:clickable="true"
android:enabled="true"
android:focusable="true"
android:onClick="@{(v) -> viewModel.onParseButtonClicked()}"
android:text="@string/math_expression_parse_button_label"
android:textSize="14sp"
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/next_button_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/component_color_shared_back_forward_arrow_button_color" />
app:tint="@color/component_color_shared_back_forward_arrow_button_color"
android:contentDescription="@string/previous_button_content_description" />

<ImageButton
android:id="@+id/next_state_navigation_button"
Expand All @@ -55,6 +56,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/component_color_shared_back_forward_arrow_button_color" />
app:tint="@color/component_color_shared_back_forward_arrow_button_color"
android:contentDescription="@string/next_button_content_description" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/previous_button_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/component_color_shared_back_forward_arrow_button_color" />
app:tint="@color/component_color_shared_back_forward_arrow_button_color"
android:contentDescription="@string/previous_button_content_description" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
6 changes: 4 additions & 2 deletions app/src/main/res/layout/profile_chooser_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_language_icon_grey_24dp" />
app:srcCompat="@drawable/ic_language_icon_grey_24dp"
android:contentDescription="@string/language_icon_content_description" />

<TextView
style="@style/Subtitle1ViewCenter"
Expand Down Expand Up @@ -115,7 +116,8 @@
android:paddingTop="12dp"
android:paddingEnd="16dp"
android:paddingBottom="12dp"
app:srcCompat="@drawable/ic_settings_grey_48dp" />
app:srcCompat="@drawable/ic_settings_grey_48dp"
android:contentDescription="@string/setting_icon_content_description" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/profile_picture_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/profile_picture_activity_app_bar_layout"
profile:src="@{viewModel.profileAvatar}"
tools:src="@drawable/ic_default_avatar" />
tools:src="@drawable/ic_default_avatar"
android:contentDescription="@string/profile_picture_image_view_content_description" />

<View
android:id="@+id/app_version_shadow_view"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/return_to_topic_button_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/component_color_shared_back_forward_arrow_button_color" />
app:tint="@color/component_color_shared_back_forward_arrow_button_color"
android:contentDescription="@string/previous_button_content_description" />

<Button
android:id="@+id/return_to_topic_button"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/revision_card_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
android:layout_gravity="end"
android:minWidth="48dp"
android:minHeight="48dp"
android:scaleType="center" />
android:scaleType="center"
android:contentDescription="@string/options_menu_content_description" />

<TextView
android:id="@+id/revision_card_toolbar_title"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/story_chapter_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
app:layout_constraintEnd_toEndOf="@id/chapter_thumbnail"
app:layout_constraintStart_toStartOf="@id/chapter_thumbnail"
app:layout_constraintTop_toTopOf="@id/chapter_thumbnail"
app:srcCompat="@drawable/ic_baseline_lock_24" />
app:srcCompat="@drawable/ic_baseline_lock_24"
android:contentDescription="@string/lock_icon_content_description" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/submit_button_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/component_color_shared_back_forward_arrow_button_color" />
app:tint="@color/component_color_shared_back_forward_arrow_button_color"
android:contentDescription="@string/previous_button_content_description" />

<Button
android:id="@+id/submit_answer_button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
<ImageView
android:id="@+id/view_for_drawable_binding_adapters_test"
android:layout_width="match_parent"
android:layout_height="320dp" />
android:layout_height="320dp"
android:importantForAccessibility="no" />
</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/image_view_for_data_binding"
android:layout_width="32dp"
android:layout_height="32dp"/>
android:layout_height="32dp"
android:importantForAccessibility="no" />

3 changes: 2 additions & 1 deletion app/src/main/res/layout/test_url_parser_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
<ImageView
android:id="@+id/test_url_parser_image_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:importantForAccessibility="no" />
</FrameLayout>
8 changes: 5 additions & 3 deletions app/src/main/res/layout/text_input_interaction_item.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<data>
Expand All @@ -21,14 +22,15 @@
<org.oppia.android.app.customview.interaction.TextInputInteractionView
android:id="@+id/text_input_interaction_view"
style="@style/InputInteractionEditText"
android:contentDescription="@{viewModel.hintText.length() == 0 ? @string/text_input_default_content_description : ``}"
android:hint="@{viewModel.hintText}"
android:contentDescription="@{viewModel.hintText.length() == 0 ? @string/text_input_default_content_description : ``}"
android:inputType="text"
android:text="@={viewModel.answerText}"
android:textColorHint="@color/component_color_shared_edit_text_hint_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:textChangedListener="@{viewModel.answerTextWatcher}" />
app:textChangedListener="@{viewModel.answerTextWatcher}"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
Loading

0 comments on commit 8aefb05

Please sign in to comment.