Added plain text only indicator

pull/156/head
M66B 6 years ago
parent c028297c57
commit 710551e2e9

@ -195,6 +195,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private ImageView ivSnoozed;
private ImageView ivBrowsed;
private ImageView ivAnswered;
private ImageView ivPlain;
private ImageView ivReceipt;
private ImageView ivAttachments;
private TextView tvSubject;
@ -282,6 +283,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ivSnoozed = itemView.findViewById(R.id.ivSnoozed);
ivBrowsed = itemView.findViewById(R.id.ivBrowsed);
ivAnswered = itemView.findViewById(R.id.ivAnswered);
ivPlain = itemView.findViewById(R.id.ivPlain);
ivReceipt = itemView.findViewById(R.id.ivReceipt);
ivAttachments = itemView.findViewById(R.id.ivAttachments);
tvSubject = itemView.findViewById(R.id.tvSubject);
@ -439,6 +441,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ivSnoozed.setVisibility(View.GONE);
ivBrowsed.setVisibility(View.GONE);
ivAnswered.setVisibility(View.GONE);
ivPlain.setVisibility(View.GONE);
ivReceipt.setVisibility(View.GONE);
ivAttachments.setVisibility(View.GONE);
tvSubject.setText(null);
@ -499,6 +502,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ivSnoozed.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
ivBrowsed.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
ivAnswered.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
ivPlain.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
ivReceipt.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
ivAttachments.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
tvSubject.setAlpha(dim ? Helper.LOW_LIGHT : 1.0f);
@ -557,6 +561,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
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);
ivPlain.setVisibility(message.plain_only != null && message.plain_only ? View.VISIBLE : View.GONE);
ivReceipt.setVisibility(message.receipt_request != null && message.receipt_request ? View.VISIBLE : View.GONE);
ivAttachments.setVisibility(message.attachments > 0 ? View.VISIBLE : View.GONE);

@ -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="M3,18h12v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h18v-2L3,11v2z"/>
</vector>

@ -356,6 +356,28 @@
app:layout_constraintStart_toEndOf="@id/ivAnswered"
app:layout_constraintTop_toTopOf="@id/ivAnswered" />
<ImageView
android:id="@+id/ivPlain"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="24dp"
android:contentDescription="@string/title_legend_plain_only"
android:src="@drawable/baseline_notes_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivAnswered" />
<TextView
android:id="@+id/tvPlain"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text="@string/title_legend_plain_only"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/ivPlain"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/ivPlain"
app:layout_constraintTop_toTopOf="@id/ivPlain" />
<ImageView
android:id="@+id/ivReceipt"
android:layout_width="24dp"
@ -364,7 +386,7 @@
android:contentDescription="@string/title_legend_receipt"
android:src="@drawable/baseline_playlist_add_check_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivAnswered" />
app:layout_constraintTop_toBottomOf="@id/ivPlain" />
<TextView
android:id="@+id/tvReceipt"

@ -152,6 +152,17 @@
app:layout_constraintStart_toEndOf="@id/ivBrowsed"
app:layout_constraintTop_toTopOf="@+id/tvSubject" />
<ImageView
android:id="@+id/ivPlain"
android:layout_width="21dp"
android:layout_height="21dp"
android:layout_marginStart="6dp"
android:contentDescription="@string/title_legend_plain_only"
android:src="@drawable/baseline_notes_24"
app:layout_constraintBottom_toBottomOf="@+id/tvSubject"
app:layout_constraintStart_toEndOf="@id/ivAnswered"
app:layout_constraintTop_toTopOf="@+id/tvSubject" />
<ImageView
android:id="@+id/ivReceipt"
android:layout_width="21dp"
@ -160,7 +171,7 @@
android:contentDescription="@string/title_legend_receipt"
android:src="@drawable/baseline_playlist_add_check_24"
app:layout_constraintBottom_toBottomOf="@+id/tvSubject"
app:layout_constraintStart_toEndOf="@id/ivAnswered"
app:layout_constraintStart_toEndOf="@id/ivPlain"
app:layout_constraintTop_toTopOf="@+id/tvSubject" />
<ImageView

@ -177,6 +177,17 @@
app:layout_constraintStart_toEndOf="@id/ivBrowsed"
app:layout_constraintTop_toTopOf="@+id/tvFolder" />
<ImageView
android:id="@+id/ivPlain"
android:layout_width="21dp"
android:layout_height="21dp"
android:layout_marginStart="6dp"
android:contentDescription="@string/title_legend_plain_only"
android:src="@drawable/baseline_notes_24"
app:layout_constraintBottom_toBottomOf="@+id/tvFolder"
app:layout_constraintStart_toEndOf="@id/ivAnswered"
app:layout_constraintTop_toTopOf="@+id/tvFolder" />
<ImageView
android:id="@+id/ivReceipt"
android:layout_width="21dp"
@ -185,7 +196,7 @@
android:contentDescription="@string/title_legend_receipt"
android:src="@drawable/baseline_playlist_add_check_24"
app:layout_constraintBottom_toBottomOf="@+id/tvFolder"
app:layout_constraintStart_toEndOf="@id/ivAnswered"
app:layout_constraintStart_toEndOf="@id/ivPlain"
app:layout_constraintTop_toTopOf="@+id/tvFolder" />
<ImageView

@ -543,6 +543,7 @@
<string name="title_legend_snoozed">Is snoozed</string>
<string name="title_legend_browsed">Is browsed or searched</string>
<string name="title_legend_answered">Has been answered</string>
<string name="title_legend_plain_only">Is plain text only</string>
<string name="title_legend_receipt">Receipt was requested</string>
<string name="title_legend_attachment">Has attachment</string>
<string name="title_legend_flagged">Is starred</string>

Loading…
Cancel
Save