diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-09-05 17:21:56 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-09-05 17:21:56 +0000 |
commit | eaef71dea0b66f82570fdfeb5629900b38ff8f28 (patch) | |
tree | c9e7181e345ec6c030dbc92726d02e443d353b93 /app/src | |
parent | 2d0675202f402bfde2ddd5f8572d1bfd5d76f91f (diff) | |
download | infinity-for-reddit-eaef71dea0b66f82570fdfeb5629900b38ff8f28.tar infinity-for-reddit-eaef71dea0b66f82570fdfeb5629900b38ff8f28.tar.gz infinity-for-reddit-eaef71dea0b66f82570fdfeb5629900b38ff8f28.tar.bz2 infinity-for-reddit-eaef71dea0b66f82570fdfeb5629900b38ff8f28.tar.lz infinity-for-reddit-eaef71dea0b66f82570fdfeb5629900b38ff8f28.tar.xz infinity-for-reddit-eaef71dea0b66f82570fdfeb5629900b38ff8f28.tar.zst infinity-for-reddit-eaef71dea0b66f82570fdfeb5629900b38ff8f28.zip |
Continue adding contentDescription for image views.
Diffstat (limited to '')
9 files changed, 58 insertions, 11 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchResultActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchResultActivity.java index 8db414e4..fe0c16fe 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchResultActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchResultActivity.java @@ -280,45 +280,58 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect switch (fabOption) { case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_refresh_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_refresh)); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_sort_toolbar_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_change_sort_type)); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_post_layout_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_change_post_layout)); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SEARCH: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_search_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_search)); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_SUBREDDIT: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_subreddit_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_go_to_subreddit)); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_USER: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_user_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_go_to_user)); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_RANDOM: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_random_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_random)); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_HIDE_READ_POSTS: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { binding.fabSearchResultActivity.setImageResource(R.drawable.ic_filter_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_filter_posts)); } else { binding.fabSearchResultActivity.setImageResource(R.drawable.ic_hide_read_posts_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_hide_read_posts)); } break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_filter_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_filter_posts)); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_TOP: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_keyboard_double_arrow_up_24); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_go_to_top)); break; default: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { binding.fabSearchResultActivity.setImageResource(R.drawable.ic_filter_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_filter_posts)); } else { binding.fabSearchResultActivity.setImageResource(R.drawable.ic_add_day_night_24dp); + binding.fabSearchResultActivity.setContentDescription(getString(R.string.content_description_submit_post)); } break; } diff --git a/app/src/main/res/layout/activity_search_result.xml b/app/src/main/res/layout/activity_search_result.xml index a9e730fa..6a5189b6 100644 --- a/app/src/main/res/layout/activity_search_result.xml +++ b/app/src/main/res/layout/activity_search_result.xml @@ -52,6 +52,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/fab_margin" - android:layout_gravity="bottom|end" /> + android:layout_gravity="bottom|end" + android:contentDescription="@null" /> </androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_selected_subreddits.xml b/app/src/main/res/layout/activity_selected_subreddits.xml index c9700c72..fd1dbdbb 100644 --- a/app/src/main/res/layout/activity_selected_subreddits.xml +++ b/app/src/main/res/layout/activity_selected_subreddits.xml @@ -44,6 +44,7 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/fab_margin" android:layout_gravity="bottom|end" - android:src="@drawable/ic_add_24dp" /> + android:src="@drawable/ic_add_24dp" + android:contentDescription="@string/content_description_add_subreddit_or_user" /> </androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_submit_crosspost.xml b/app/src/main/res/layout/activity_submit_crosspost.xml index 5412697e..36caa335 100644 --- a/app/src/main/res/layout/activity_submit_crosspost.xml +++ b/app/src/main/res/layout/activity_submit_crosspost.xml @@ -242,7 +242,8 @@ android:layout_margin="16dp" android:layout_gravity="start" android:background="@drawable/play_button_round_background" - android:visibility="gone" /> + android:visibility="gone" + android:contentDescription="@string/content_description_video_indicator" /> </FrameLayout> diff --git a/app/src/main/res/layout/activity_subscribed_subreddits_multiselection.xml b/app/src/main/res/layout/activity_subscribed_subreddits_multiselection.xml index 4f7a26ad..8c95da13 100644 --- a/app/src/main/res/layout/activity_subscribed_subreddits_multiselection.xml +++ b/app/src/main/res/layout/activity_subscribed_subreddits_multiselection.xml @@ -61,7 +61,8 @@ <ImageView android:id="@+id/no_subscriptions_image_view_subscribed_subreddits_multiselection_activity" android:layout_width="150dp" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + android:contentDescription="@string/content_description_no_subscriptions_indicator" /> <TextView android:id="@+id/error_text_view_subscribed_subreddits_multiselection_activity" diff --git a/app/src/main/res/layout/activity_subscribed_thing_listing.xml b/app/src/main/res/layout/activity_subscribed_thing_listing.xml index dc645f64..2bae0cda 100644 --- a/app/src/main/res/layout/activity_subscribed_thing_listing.xml +++ b/app/src/main/res/layout/activity_subscribed_thing_listing.xml @@ -73,6 +73,7 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/fab_margin" android:layout_gravity="bottom|end" + android:contentDescription="@string/content_description_create_multireddit" app:srcCompat="@drawable/ic_add_day_night_24dp" /> </androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_theme_preview.xml b/app/src/main/res/layout/activity_theme_preview.xml index 9f40fd7a..89d02306 100644 --- a/app/src/main/res/layout/activity_theme_preview.xml +++ b/app/src/main/res/layout/activity_theme_preview.xml @@ -157,7 +157,8 @@ android:paddingTop="8dp" android:paddingBottom="8dp" android:src="@drawable/ic_subscritptions_bottom_app_bar_24dp" - android:background="?attr/selectableItemBackgroundBorderless" /> + android:background="?attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/content_description_bottom_navigation_bar_button" /> <ImageView android:id="@+id/multi_reddit_bottom_app_bar_theme_preview_activity" @@ -168,7 +169,8 @@ android:paddingTop="8dp" android:paddingBottom="8dp" android:src="@drawable/ic_multi_reddit_24dp" - android:background="?attr/selectableItemBackgroundBorderless" /> + android:background="?attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/content_description_bottom_navigation_bar_button" /> <TextView android:layout_width="0dp" @@ -185,7 +187,8 @@ android:paddingTop="8dp" android:paddingBottom="8dp" android:src="@drawable/ic_inbox_24dp" - android:background="?attr/selectableItemBackgroundBorderless" /> + android:background="?attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/content_description_bottom_navigation_bar_button" /> <ImageView android:id="@+id/profile_bottom_app_bar_theme_preview_activity" @@ -197,7 +200,8 @@ android:paddingBottom="8dp" android:gravity="center" android:src="@drawable/ic_account_circle_24dp" - android:background="?attr/selectableItemBackgroundBorderless" /> + android:background="?attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/content_description_bottom_navigation_bar_button" /> </LinearLayout> @@ -208,6 +212,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/fab_margin" + android:contentDescription="@string/content_description_fab" app:srcCompat="@drawable/ic_add_day_night_24dp" app:tint="@android:color/white" app:layout_anchor="@id/bottom_navigation_theme_preview_activity" /> diff --git a/app/src/main/res/layout/activity_view_image_or_gif.xml b/app/src/main/res/layout/activity_view_image_or_gif.xml index c7791c9f..24d433ee 100644 --- a/app/src/main/res/layout/activity_view_image_or_gif.xml +++ b/app/src/main/res/layout/activity_view_image_or_gif.xml @@ -73,7 +73,8 @@ android:layout_height="wrap_content" android:padding="16dp" android:src="@drawable/ic_file_download_toolbar_white_24dp" - android:background="?attr/selectableItemBackgroundBorderless" /> + android:background="?attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/content_description_download" /> <ImageView android:id="@+id/share_image_view_view_image_or_gif_activity" @@ -81,7 +82,8 @@ android:layout_height="wrap_content" android:padding="16dp" android:src="@drawable/ic_share_toolbar_white_24dp" - android:background="?attr/selectableItemBackgroundBorderless" /> + android:background="?attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/content_description_share" /> <ImageView android:id="@+id/wallpaper_image_view_view_image_or_gif_activity" @@ -90,7 +92,8 @@ android:layout_marginEnd="16dp" android:padding="16dp" android:src="@drawable/ic_wallpaper_white_24dp" - android:background="?attr/selectableItemBackgroundBorderless" /> + android:background="?attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/content_description_set_as_wallpaper" /> </LinearLayout> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 49f04e0a..2e7e9995 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1453,6 +1453,27 @@ <string name="content_description_select_video">Select video</string> <string name="content_description_delete_texts">Delete texts</string> <string name="content_description_handle_link">Handle link</string> + <string name="content_description_submit_post">Submit post</string> + <string name="content_description_refresh">Refresh</string> + <string name="content_description_change_sort_type">Change sort type</string> + <string name="content_description_change_post_layout">Change post layout</string> + <string name="content_description_search">Search</string> + <string name="content_description_go_to_subreddit">Go to subreddit</string> + <string name="content_description_go_to_user">Go to user</string> + <string name="content_description_random">Random</string> + <string name="content_description_filter_posts">Filter posts</string> + <string name="content_description_hide_read_posts">Hide read posts</string> + <string name="content_description_go_to_top">Go to top</string> + <string name="content_description_add_subreddit_or_user">Add subreddit or user</string> + <string name="content_description_video_indicator">Video indicator</string> + <string name="content_description_no_subscriptions_indicator">No subscriptions indicator</string> + <string name="content_description_create_multireddit">Create multireddit</string> + <string name="content_description_bottom_navigation_bar_button">Bottom navigation bar button</string> + <string name="content_description_fab">Floating action button</string> + <string name="content_description_download">Download</string> + <string name="content_description_share">Share</string> + <string name="content_description_set_as_wallpaper">Set as wallpaper</string> + </resources> |