Show browsed/searched messages

This commit is contained in:
M66B 2019-01-19 16:14:40 +00:00
parent 0c01bec194
commit 49418480a7
6 changed files with 84 additions and 26 deletions

View File

@ -154,6 +154,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private TextView tvTime;
private ImageView ivDraft;
private ImageView ivSnoozed;
private ImageView ivBrowsed;
private ImageView ivAnswered;
private ImageView ivAttachments;
private TextView tvSubject;
@ -219,6 +220,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvTime = itemView.findViewById(R.id.tvTime);
ivDraft = itemView.findViewById(R.id.ivDraft);
ivSnoozed = itemView.findViewById(R.id.ivSnoozed);
ivBrowsed = itemView.findViewById(R.id.ivBrowsed);
ivAnswered = itemView.findViewById(R.id.ivAnswered);
ivAttachments = itemView.findViewById(R.id.ivAttachments);
tvSubject = itemView.findViewById(R.id.tvSubject);
@ -345,6 +347,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvTime.setText(null);
ivDraft.setVisibility(View.GONE);
ivSnoozed.setVisibility(View.GONE);
ivBrowsed.setVisibility(View.GONE);
ivAnswered.setVisibility(View.GONE);
ivAttachments.setVisibility(View.GONE);
tvSubject.setText(null);
@ -398,6 +401,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvTime.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
ivDraft.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
ivSnoozed.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
ivBrowsed.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
ivAnswered.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
ivAttachments.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
tvSubject.setAlpha(message.duplicate ? Helper.LOW_LIGHT : 1.0f);
@ -488,6 +492,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ivDraft.setVisibility(message.drafts > 0 ? View.VISIBLE : View.GONE);
ivSnoozed.setVisibility(message.ui_snoozed == null ? View.GONE : View.VISIBLE);
ivBrowsed.setVisibility(message.ui_browsed ? View.VISIBLE : View.GONE);
ivAnswered.setVisibility(message.ui_answered ? View.VISIBLE : View.GONE);
ivAttachments.setVisibility(message.attachments > 0 ? View.VISIBLE : View.GONE);
btnDownloadAttachments.setVisibility(View.GONE);

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M14,10L2,10v2h12v-2zM14,6L2,6v2h12L14,6zM18,14v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM2,16h8v-2L2,14v2z"/>
</vector>

View File

@ -197,27 +197,6 @@
app:layout_constraintStart_toEndOf="@id/ivCC"
app:layout_constraintTop_toTopOf="@id/ivCC" />
<ImageView
android:id="@+id/ivSnoozed"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="24dp"
android:src="@drawable/baseline_timelapse_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivCC" />
<TextView
android:id="@+id/tvSnoozed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text="@string/title_legend_snoozed"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/ivSnoozed"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/ivSnoozed"
app:layout_constraintTop_toTopOf="@id/ivSnoozed" />
<ImageView
android:id="@+id/ivDraft"
android:layout_width="24dp"
@ -225,7 +204,7 @@
android:layout_marginTop="24dp"
android:src="@drawable/baseline_edit_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivSnoozed" />
app:layout_constraintTop_toBottomOf="@id/ivCC" />
<TextView
android:id="@+id/tvDraft"
@ -239,6 +218,49 @@
app:layout_constraintStart_toEndOf="@id/ivDraft"
app:layout_constraintTop_toTopOf="@id/ivDraft" />
<ImageView
android:id="@+id/ivSnoozed"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="24dp"
android:src="@drawable/baseline_timelapse_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivDraft" />
<TextView
android:id="@+id/tvSnoozed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text="@string/title_legend_snoozed"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/ivSnoozed"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/ivSnoozed"
app:layout_constraintTop_toTopOf="@id/ivSnoozed" />
<ImageView
android:id="@+id/ivBrowsed"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="24dp"
android:src="@drawable/baseline_playlist_add_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivSnoozed" />
<TextView
android:id="@+id/tvBrowsed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text="@string/title_legend_browsed"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/ivBrowsed"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/ivBrowsed"
app:layout_constraintTop_toTopOf="@id/ivBrowsed" />
<ImageView
android:id="@+id/ivAnswered"
android:layout_width="24dp"
@ -246,7 +268,7 @@
android:layout_marginTop="24dp"
android:src="@drawable/baseline_reply_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivDraft" />
app:layout_constraintTop_toBottomOf="@id/ivBrowsed" />
<TextView
android:id="@+id/tvAnswered"

View File

@ -123,6 +123,16 @@
app:layout_constraintStart_toEndOf="@id/ivDraft"
app:layout_constraintTop_toTopOf="@+id/tvSubject" />
<ImageView
android:id="@+id/ivBrowsed"
android:layout_width="21dp"
android:layout_height="21dp"
android:layout_marginStart="6dp"
android:src="@drawable/baseline_playlist_add_24"
app:layout_constraintBottom_toBottomOf="@+id/tvSubject"
app:layout_constraintStart_toEndOf="@id/ivSnoozed"
app:layout_constraintTop_toTopOf="@+id/tvSubject" />
<ImageView
android:id="@+id/ivAnswered"
android:layout_width="21dp"
@ -130,7 +140,7 @@
android:layout_marginStart="6dp"
android:src="@drawable/baseline_reply_24"
app:layout_constraintBottom_toBottomOf="@+id/tvSubject"
app:layout_constraintStart_toEndOf="@id/ivSnoozed"
app:layout_constraintStart_toEndOf="@id/ivBrowsed"
app:layout_constraintTop_toTopOf="@+id/tvSubject" />
<ImageView

View File

@ -146,6 +146,16 @@
app:layout_constraintStart_toEndOf="@id/ivDraft"
app:layout_constraintTop_toTopOf="@+id/tvFolder" />
<ImageView
android:id="@+id/ivBrowsed"
android:layout_width="21dp"
android:layout_height="21dp"
android:layout_marginStart="6dp"
android:src="@drawable/baseline_playlist_add_24"
app:layout_constraintBottom_toBottomOf="@+id/tvFolder"
app:layout_constraintStart_toEndOf="@id/ivSnoozed"
app:layout_constraintTop_toTopOf="@+id/tvFolder" />
<ImageView
android:id="@+id/ivAnswered"
android:layout_width="21dp"
@ -153,7 +163,7 @@
android:layout_marginStart="6dp"
android:src="@drawable/baseline_reply_24"
app:layout_constraintBottom_toBottomOf="@+id/tvFolder"
app:layout_constraintStart_toEndOf="@id/ivSnoozed"
app:layout_constraintStart_toEndOf="@id/ivBrowsed"
app:layout_constraintTop_toTopOf="@+id/tvFolder" />
<ImageView

View File

@ -408,8 +408,9 @@
<string name="title_legend_thread">Conversation</string>
<string name="title_legend_cc">CC/BCC</string>
<string name="title_legend_attachment">Attachment</string>
<string name="title_legend_snoozed">Snoozed</string>
<string name="title_legend_draft">Draft/edit</string>
<string name="title_legend_snoozed">Snoozed</string>
<string name="title_legend_browsed">Browsed or searched</string>
<string name="title_legend_answered">Answered</string>
<string name="title_legend_contacts">Contacts</string>
<string name="title_legend_view">View content</string>