mirror of https://github.com/M66B/FairEmail.git
Better content descriptions for the identity list item
Signed-off-by: Peter Vágner <pvdeejay@gmail.com>
This commit is contained in:
parent
c5475bab39
commit
daec022622
|
@ -111,18 +111,23 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
|
|||
vwColor.setVisibility(ActivityBilling.isPro(context) ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
ivSync.setImageResource(identity.synchronize ? R.drawable.baseline_sync_24 : R.drawable.baseline_sync_disabled_24);
|
||||
ivSync.setContentDescription(context.getString(identity.synchronize ? R.string.title_legend_synchronize_on : R.string.title_legend_synchronize_off));
|
||||
|
||||
ivOAuth.setVisibility(identity.auth_type == MailService.AUTH_TYPE_PASSWORD ? View.GONE : View.VISIBLE);
|
||||
ivPrimary.setVisibility(identity.primary ? View.VISIBLE : View.GONE);
|
||||
tvName.setText(identity.getDisplayName());
|
||||
tvUser.setText(identity.email);
|
||||
|
||||
if ("connected".equals(identity.state))
|
||||
if ("connected".equals(identity.state)) {
|
||||
ivState.setImageResource(R.drawable.baseline_cloud_24);
|
||||
else if ("connecting".equals(identity.state))
|
||||
ivState.setContentDescription(context.getString(R.string.title_legend_connected));
|
||||
} else if ("connecting".equals(identity.state)) {
|
||||
ivState.setImageResource(R.drawable.baseline_cloud_queue_24);
|
||||
else
|
||||
ivState.setContentDescription(context.getString(R.string.title_legend_connecting));
|
||||
} else {
|
||||
ivState.setImageDrawable(null);
|
||||
ivState.setContentDescription(null);
|
||||
}
|
||||
ivState.setVisibility(identity.synchronize ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
tvHost.setText(String.format("%s:%d", identity.host, identity.port));
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_connection_state"
|
||||
android:contentDescription="@string/title_legend_disconnected"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName"
|
||||
|
@ -87,7 +87,7 @@
|
|||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_sync_state"
|
||||
android:contentDescription="@string/title_legend_synchronize_on"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName"
|
||||
|
|
Loading…
Reference in New Issue