From e14572506ca2b308e6f0867d443ce218ab3383ae Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 5 Oct 2022 17:09:31 +0200 Subject: [PATCH] Fix #336 - talkback issues --- .../java/app/fedilab/android/ui/drawer/StatusAdapter.java | 3 ++- app/src/main/res/layout/activity_main.xml | 1 + app/src/main/res/layout/drawer_status.xml | 6 ++++++ app/src/main/res/values/strings.xml | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java index 522281062..f5847cf5a 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java @@ -968,7 +968,8 @@ public class StatusAdapter extends RecyclerView.Adapter holder.binding.visibilitySmall.setVisibility(View.GONE); holder.binding.reblogsCount.setText(String.valueOf(statusToDeal.reblogs_count)); holder.binding.favoritesCount.setText(String.valueOf(statusToDeal.favourites_count)); - holder.binding.time.setText(Helper.longDateToString(statusToDeal.created_at)); + holder.binding.time.setText(Helper.dateDiff(context, statusToDeal.created_at)); + Helper.absoluteDateTimeReveal(context, holder.binding.time, statusToDeal.created_at); holder.binding.visibility.setImageResource(ressource); holder.binding.time.setVisibility(View.VISIBLE); } else { diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 0e7149f25..603b54f18 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -78,6 +78,7 @@ android:layout_gravity="center_vertical" android:layout_marginEnd="10dp" android:gravity="end" + android:contentDescription="@string/display_timelines" android:src="@drawable/ic_baseline_more_horiz_24" android:tint="?attr/iconColor" android:visibility="gone" /> diff --git a/app/src/main/res/layout/drawer_status.xml b/app/src/main/res/layout/drawer_status.xml index e3f13cff6..e04fb47f1 100644 --- a/app/src/main/res/layout/drawer_status.xml +++ b/app/src/main/res/layout/drawer_status.xml @@ -553,6 +553,7 @@ style="@style/Widget.AppCompat.Button.Borderless" android:layout_width="28dp" android:layout_height="28dp" + android:contentDescription="@string/reply" android:layout_marginStart="6dp" android:adjustViewBounds="true" app:srcCompat="@drawable/ic_reply" /> @@ -575,6 +576,7 @@ android:layout_marginStart="12dp" android:layout_marginTop="2dp" android:adjustViewBounds="true" + android:contentDescription="@string/reblog_add" app:sparkbutton_activeImage="@drawable/ic_repeat" app:sparkbutton_animationSpeed="1.5" app:sparkbutton_iconSize="28dp" @@ -590,6 +592,7 @@ android:layout_marginStart="12dp" android:layout_marginTop="2dp" android:adjustViewBounds="true" + android:contentDescription="@string/favourite_add" app:sparkbutton_activeImage="@drawable/ic_baseline_star_24" app:sparkbutton_animationSpeed="1.5" app:sparkbutton_iconSize="28dp" @@ -606,6 +609,7 @@ android:layout_marginTop="2dp" android:adjustViewBounds="true" android:visibility="gone" + android:contentDescription="@string/bookmark_add" app:sparkbutton_activeImage="@drawable/ic_baseline_bookmark_24" app:sparkbutton_animationSpeed="1.5" app:sparkbutton_iconSize="24dp" @@ -619,6 +623,7 @@ android:layout_height="28dp" android:layout_marginStart="12dp" android:adjustViewBounds="true" + android:contentDescription="@string/cached_messages" android:src="@drawable/ic_baseline_cached_24" android:visibility="gone" tools:visibility="visible" /> @@ -657,6 +662,7 @@ Timelines will be cached so the application will be faster. Load thumbnails for media Display media + Display timelines + Cached message + Reply + Display options