mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-27 16:33:47 +00:00
Accessibility improvements
This commit is contained in:
parent
f5177a8245
commit
e1755c5fe0
3 changed files with 27 additions and 13 deletions
|
@ -263,6 +263,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
private ImageButton ibExpander;
|
||||
private ImageView ibFlagged;
|
||||
private ImageButton ibAvatar;
|
||||
private View vwSeen;
|
||||
private ImageButton ibAuth;
|
||||
private ImageView ivPriorityHigh;
|
||||
private ImageView ivPriorityLow;
|
||||
|
@ -386,6 +387,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ibExpander = itemView.findViewById(R.id.ibExpander);
|
||||
ibFlagged = itemView.findViewById(R.id.ibFlagged);
|
||||
ibAvatar = itemView.findViewById(R.id.ibAvatar);
|
||||
vwSeen = itemView.findViewById(R.id.vwSeen);
|
||||
ibAuth = itemView.findViewById(R.id.ibAuth);
|
||||
ivPriorityHigh = itemView.findViewById(R.id.ivPriorityHigh);
|
||||
ivPriorityLow = itemView.findViewById(R.id.ivPriorityLow);
|
||||
|
@ -777,9 +779,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
vwColor.setBackgroundColor(colorBackground);
|
||||
}
|
||||
|
||||
vwColor.setContentDescription(context.getString(
|
||||
message.unseen > 0 ? R.string.title_accessibility_unseen : R.string.title_accessibility_seen));
|
||||
|
||||
// Expander
|
||||
if (ibExpander.getTag() == null || (boolean) ibExpander.getTag() != expanded) {
|
||||
ibExpander.setTag(expanded);
|
||||
|
@ -795,6 +794,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
// Photo
|
||||
ibAvatar.setVisibility(avatars ? View.INVISIBLE : View.GONE);
|
||||
|
||||
vwSeen.setContentDescription(context.getString(
|
||||
message.unseen > 0 ? R.string.title_accessibility_unseen : R.string.title_accessibility_seen));
|
||||
|
||||
// Line 1
|
||||
ibAuth.setVisibility(authentication && !authenticated ? View.VISIBLE : View.GONE);
|
||||
ivPriorityHigh.setVisibility(EntityMessage.PRIORITIY_HIGH.equals(message.priority) ? View.VISIBLE : View.GONE);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
android:importantForAccessibility="no"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/paddingBottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -57,6 +58,13 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/paddingTop"
|
||||
app:srcCompat="@drawable/baseline_person_24" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vwSeen"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/ibAvatar"
|
||||
app:layout_constraintTop_toBottomOf="@id/paddingTop"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/ibAuth"
|
||||
android:layout_width="21dp"
|
||||
|
@ -66,7 +74,7 @@
|
|||
android:contentDescription="@string/title_legend_auth"
|
||||
android:tint="@color/colorError"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvFrom"
|
||||
app:layout_constraintStart_toEndOf="@id/ibAvatar"
|
||||
app:layout_constraintStart_toEndOf="@id/vwSeen"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvFrom"
|
||||
app:srcCompat="@drawable/baseline_flag_24" />
|
||||
|
||||
|
@ -162,9 +170,8 @@
|
|||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:contentDescription="@string/title_legend_folder_type"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvSubject"
|
||||
app:layout_constraintStart_toEndOf="@id/ibAvatar"
|
||||
app:layout_constraintStart_toEndOf="@id/vwSeen"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvSubject"
|
||||
app:srcCompat="@drawable/baseline_edit_24" />
|
||||
|
||||
|
@ -236,7 +243,6 @@
|
|||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_thread"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSubject"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ibFlagged"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvSubject"
|
||||
|
@ -268,7 +274,7 @@
|
|||
android:text="Folder"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ibFlagged"
|
||||
app:layout_constraintStart_toEndOf="@id/ibAvatar"
|
||||
app:layout_constraintStart_toEndOf="@id/vwSeen"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSubject" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
android:importantForAccessibility="no"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/paddingBottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -56,6 +57,13 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/paddingTop"
|
||||
app:srcCompat="@drawable/baseline_person_24" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vwSeen"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/ibAvatar"
|
||||
app:layout_constraintTop_toBottomOf="@id/paddingTop" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/ibAuth"
|
||||
android:layout_width="21dp"
|
||||
|
@ -65,7 +73,7 @@
|
|||
android:contentDescription="@string/title_legend_auth"
|
||||
android:tint="@color/colorError"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvFrom"
|
||||
app:layout_constraintStart_toEndOf="@id/ibAvatar"
|
||||
app:layout_constraintStart_toEndOf="@id/vwSeen"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvFrom"
|
||||
app:srcCompat="@drawable/baseline_flag_24" />
|
||||
|
||||
|
@ -166,7 +174,7 @@
|
|||
android:text="Subject"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ibFlagged"
|
||||
app:layout_constraintStart_toEndOf="@id/ibAvatar"
|
||||
app:layout_constraintStart_toEndOf="@id/vwSeen"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFrom" />
|
||||
|
||||
<ImageButton
|
||||
|
@ -186,9 +194,8 @@
|
|||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:contentDescription="@string/title_legend_folder_type"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvFolder"
|
||||
app:layout_constraintStart_toEndOf="@id/ibAvatar"
|
||||
app:layout_constraintStart_toEndOf="@id/vwSeen"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvFolder"
|
||||
app:srcCompat="@drawable/baseline_edit_24" />
|
||||
|
||||
|
@ -259,7 +266,6 @@
|
|||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_thread"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvFolder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ibFlagged"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvFolder"
|
||||
|
|
Loading…
Reference in a new issue