mirror of https://github.com/M66B/FairEmail.git
Moved size from header to addresses
This commit is contained in:
parent
698cba4e57
commit
04c1d00b42
|
@ -143,7 +143,6 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
private ImageView ivFlagged;
|
||||
private ImageView ivAvatar;
|
||||
private TextView tvFrom;
|
||||
private TextView tvSize;
|
||||
private TextView tvTime;
|
||||
private ImageView ivAnswered;
|
||||
private ImageView ivAttachments;
|
||||
|
@ -162,7 +161,8 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
private TextView tvReplyTo;
|
||||
private TextView tvCc;
|
||||
private TextView tvBcc;
|
||||
private TextView tvTimeReceived;
|
||||
private TextView tvTimeEx;
|
||||
private TextView tvSize;
|
||||
private TextView tvSubjectEx;
|
||||
private TextView tvKeywords;
|
||||
|
||||
|
@ -197,9 +197,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
ivAvatar = itemView.findViewById(R.id.ivAvatar);
|
||||
tvFrom = itemView.findViewById(R.id.tvFrom);
|
||||
ivAddContact = itemView.findViewById(R.id.ivAddContact);
|
||||
tvSize = itemView.findViewById(R.id.tvSize);
|
||||
tvTime = itemView.findViewById(R.id.tvTime);
|
||||
tvTimeReceived = itemView.findViewById(R.id.tvTimeReceived);
|
||||
ivAnswered = itemView.findViewById(R.id.ivAnswered);
|
||||
ivAttachments = itemView.findViewById(R.id.ivAttachments);
|
||||
tvSubject = itemView.findViewById(R.id.tvSubject);
|
||||
|
@ -216,6 +214,8 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
tvReplyTo = itemView.findViewById(R.id.tvReplyTo);
|
||||
tvCc = itemView.findViewById(R.id.tvCc);
|
||||
tvBcc = itemView.findViewById(R.id.tvBcc);
|
||||
tvTimeEx = itemView.findViewById(R.id.tvTimeEx);
|
||||
tvSize = itemView.findViewById(R.id.tvSize);
|
||||
tvSubjectEx = itemView.findViewById(R.id.tvSubjectEx);
|
||||
tvKeywords = itemView.findViewById(R.id.tvKeywords);
|
||||
|
||||
|
@ -277,7 +277,6 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
ivAvatar.setVisibility(View.GONE);
|
||||
tvFrom.setText(null);
|
||||
ivAddContact.setVisibility(View.GONE);
|
||||
tvSize.setText(null);
|
||||
tvTime.setText(null);
|
||||
ivAnswered.setVisibility(View.GONE);
|
||||
ivAttachments.setVisibility(View.GONE);
|
||||
|
@ -316,7 +315,6 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
ivFlagged.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
||||
ivAvatar.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
||||
tvFrom.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
||||
tvSize.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
||||
tvTime.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
||||
ivAnswered.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
||||
ivAttachments.setAlpha(message.duplicate ? LOW_LIGHT : 1.0f);
|
||||
|
@ -367,11 +365,6 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
tvFrom.setText(MessageHelper.getFormattedAddresses(outgoing ? message.to : message.from, !compact));
|
||||
tvTime.setText(DateUtils.getRelativeTimeSpanString(context, message.received));
|
||||
|
||||
tvSize.setText(message.size == null ? null : Helper.humanReadableByteCount(message.size, true));
|
||||
if (!message.duplicate)
|
||||
tvSize.setAlpha(message.content ? 1.0f : LOW_LIGHT);
|
||||
tvSize.setVisibility(message.size == null ? View.GONE : View.VISIBLE);
|
||||
|
||||
ivAnswered.setVisibility(message.ui_answered ? View.VISIBLE : View.GONE);
|
||||
ivAttachments.setVisibility(message.attachments > 0 ? View.VISIBLE : View.GONE);
|
||||
tvSubject.setText(message.subject);
|
||||
|
@ -451,13 +444,20 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
|||
|
||||
if (show_expanded) {
|
||||
ivExpanderAddress.setImageResource(show_addresses ? R.drawable.baseline_expand_less_24 : R.drawable.baseline_expand_more_24);
|
||||
tvTimeReceived.setText(df.format(new Date(message.received)));
|
||||
|
||||
tvFromEx.setText(MessageHelper.getFormattedAddresses(message.from, true));
|
||||
tvTo.setText(MessageHelper.getFormattedAddresses(message.to, true));
|
||||
tvReplyTo.setText(MessageHelper.getFormattedAddresses(message.reply, true));
|
||||
tvCc.setText(MessageHelper.getFormattedAddresses(message.cc, true));
|
||||
tvBcc.setText(MessageHelper.getFormattedAddresses(message.bcc, true));
|
||||
|
||||
tvTimeEx.setText(df.format(new Date(message.received)));
|
||||
|
||||
tvSize.setText(message.size == null ? null : Helper.humanReadableByteCount(message.size, true));
|
||||
if (!message.duplicate)
|
||||
tvSize.setAlpha(message.content ? 1.0f : LOW_LIGHT);
|
||||
tvSize.setVisibility(message.size == null ? View.GONE : View.VISIBLE);
|
||||
|
||||
tvSubjectEx.setText(message.subject);
|
||||
tvKeywords.setText(TextUtils.join(" ", message.keywords));
|
||||
tvKeywords.setVisibility(message.keywords.length > 0 ? View.VISIBLE : View.GONE);
|
||||
|
|
|
@ -80,22 +80,10 @@
|
|||
android:maxLines="1"
|
||||
android:text="From"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvSize"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvTime"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAvatar"
|
||||
app:layout_constraintTop_toBottomOf="@id/paddingTop" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:maxLines="1"
|
||||
android:text="123 KB"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvFrom"
|
||||
app:layout_constraintEnd_toStartOf="@id/tvTime"
|
||||
app:layout_constraintTop_toTopOf="@id/tvFrom" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTime"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -382,7 +370,7 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/tvCc" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTimeReceived"
|
||||
android:id="@+id/tvTimeEx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
|
@ -392,6 +380,17 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBcc" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="123 KB"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTimeEx" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSubjectEx"
|
||||
android:layout_width="0dp"
|
||||
|
@ -403,7 +402,7 @@
|
|||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTimeReceived" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvKeywords"
|
||||
|
@ -575,7 +574,7 @@
|
|||
android:id="@+id/grpAddress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="tvFromExTitle,tvFromEx,tvToTitle,tvTo,tvReplyToTitle,tvReplyTo,tvCcTitle,tvCc,tvBccTitle,tvBcc,tvTimeReceived,tvSubjectEx" />
|
||||
app:constraint_referenced_ids="tvFromExTitle,tvFromEx,tvToTitle,tvTo,tvReplyToTitle,tvReplyTo,tvCcTitle,tvCc,tvBccTitle,tvBcc,tvTimeEx,tvSize,tvSubjectEx" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpHeaders"
|
||||
|
|
|
@ -77,22 +77,10 @@
|
|||
android:ellipsize="end"
|
||||
android:text="From"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvSize"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvTime"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAvatar"
|
||||
app:layout_constraintTop_toBottomOf="@id/paddingTop" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:maxLines="1"
|
||||
android:text="123 KB"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvFrom"
|
||||
app:layout_constraintEnd_toStartOf="@id/tvTime"
|
||||
app:layout_constraintTop_toTopOf="@id/tvFrom" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTime"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -379,7 +367,7 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/tvCc" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTimeReceived"
|
||||
android:id="@+id/tvTimeEx"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
|
@ -389,6 +377,17 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBcc" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="123 KB"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTimeEx" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSubjectEx"
|
||||
android:layout_width="0dp"
|
||||
|
@ -400,7 +399,7 @@
|
|||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTimeReceived" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvKeywords"
|
||||
|
@ -572,7 +571,7 @@
|
|||
android:id="@+id/grpAddress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="tvFromExTitle,tvFromEx,tvToTitle,tvTo,tvReplyToTitle,tvReplyTo,tvCcTitle,tvCc,tvBccTitle,tvBcc,tvTimeReceived,tvSubjectEx" />
|
||||
app:constraint_referenced_ids="tvFromExTitle,tvFromEx,tvToTitle,tvTo,tvReplyToTitle,tvReplyTo,tvCcTitle,tvCc,tvBccTitle,tvBcc,tvTimeEx,tvSize,tvSubjectEx" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpHeaders"
|
||||
|
|
Loading…
Reference in New Issue