Browse Source

List identity email address instead of user name

The email address will be more recognizable than the user name, which could be anything
main
M66B 6 years ago
parent
commit
ee03489a31
2 changed files with 5 additions and 5 deletions
  1. +3
    -3
      app/src/main/java/eu/faircode/email/AdapterIdentity.java
  2. +2
    -2
      app/src/main/res/layout/item_identity.xml

+ 3
- 3
app/src/main/java/eu/faircode/email/AdapterIdentity.java View File

@ -52,7 +52,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
TextView tvName; TextView tvName;
ImageView ivSync; ImageView ivSync;
TextView tvHost; TextView tvHost;
TextView tvUser;
TextView tvEmail;
ViewHolder(View itemView) { ViewHolder(View itemView) {
super(itemView); super(itemView);
@ -62,7 +62,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
tvName = itemView.findViewById(R.id.tvName); tvName = itemView.findViewById(R.id.tvName);
ivSync = itemView.findViewById(R.id.ivSync); ivSync = itemView.findViewById(R.id.ivSync);
tvHost = itemView.findViewById(R.id.tvHost); tvHost = itemView.findViewById(R.id.tvHost);
tvUser = itemView.findViewById(R.id.tvUser);
tvEmail = itemView.findViewById(R.id.tvEmail);
} }
private void wire() { private void wire() {
@ -197,7 +197,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
holder.tvName.setText(identity.name); holder.tvName.setText(identity.name);
holder.ivSync.setVisibility(identity.synchronize ? View.VISIBLE : View.INVISIBLE); holder.ivSync.setVisibility(identity.synchronize ? View.VISIBLE : View.INVISIBLE);
holder.tvHost.setText(String.format("%s:%d", identity.host, identity.port)); holder.tvHost.setText(String.format("%s:%d", identity.host, identity.port));
holder.tvUser.setText(identity.user);
holder.tvEmail.setText(identity.email);
holder.wire(); holder.wire();
} }


+ 2
- 2
app/src/main/res/layout/item_identity.xml View File

@ -49,7 +49,7 @@
app:layout_constraintTop_toBottomOf="@id/ivSync" /> app:layout_constraintTop_toBottomOf="@id/ivSync" />
<TextView <TextView
android:id="@+id/tvUser"
android:id="@+id/tvEmail"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
@ -68,5 +68,5 @@
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:background="?attr/colorSeparator" android:background="?attr/colorSeparator"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvUser" />
app:layout_constraintTop_toBottomOf="@id/tvHost" />
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>

Loading…
Cancel
Save