Show folder name on third line in compact mode threads

This commit is contained in:
M66B 2019-10-19 08:36:12 +02:00
parent cc1e7d947b
commit 6fdd4f3c9e
2 changed files with 19 additions and 20 deletions

View File

@ -811,7 +811,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
else else
tvFolder.setText(message.accountName + "/" + message.getFolderName(context)); tvFolder.setText(message.accountName + "/" + message.getFolderName(context));
tvFolder.setVisibility(compact ? View.GONE : View.VISIBLE); tvFolder.setVisibility(compact && viewType != ViewType.THREAD ? View.GONE : View.VISIBLE);
if (viewType == ViewType.THREAD || !threading) { if (viewType == ViewType.THREAD || !threading) {
tvCount.setVisibility(View.GONE); tvCount.setVisibility(View.GONE);

View File

@ -50,7 +50,7 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:contentDescription="@string/title_legend_avatar" android:contentDescription="@string/title_legend_avatar"
app:layout_constraintBottom_toBottomOf="@+id/tvSubject" app:layout_constraintBottom_toBottomOf="@+id/tvFolder"
app:layout_constraintDimensionRatio="1:1" app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toEndOf="@id/paddingStart" app:layout_constraintStart_toEndOf="@id/paddingStart"
app:layout_constraintTop_toBottomOf="@id/paddingTop" app:layout_constraintTop_toBottomOf="@id/paddingTop"
@ -180,26 +180,10 @@
android:singleLine="true" android:singleLine="true"
android:text="Subject" android:text="Subject"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toStartOf="@+id/tvFolder" app:layout_constraintEnd_toStartOf="@+id/tvCount"
app:layout_constraintStart_toEndOf="@id/ivAttachments" app:layout_constraintStart_toEndOf="@id/ivAttachments"
app:layout_constraintTop_toBottomOf="@id/tvFrom" /> app:layout_constraintTop_toBottomOf="@id/tvFrom" />
<TextView
android:id="@+id/tvFolder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="6dp"
android:ellipsize="start"
android:gravity="end|center_vertical"
android:maxWidth="120dp"
android:singleLine="true"
android:text="Folder"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintBottom_toBottomOf="@id/tvSubject"
app:layout_constraintEnd_toStartOf="@+id/tvCount"
app:layout_constraintStart_toEndOf="@id/tvSubject"
app:layout_constraintTop_toTopOf="@+id/tvSubject" />
<TextView <TextView
android:id="@+id/tvCount" android:id="@+id/tvCount"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -239,6 +223,21 @@
app:layout_constraintTop_toBottomOf="@id/paddingTop" app:layout_constraintTop_toBottomOf="@id/paddingTop"
app:srcCompat="@drawable/baseline_star_24" /> app:srcCompat="@drawable/baseline_star_24" />
<TextView
android:id="@+id/tvFolder"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:ellipsize="end"
android:gravity="end"
android:singleLine="true"
android:text="Folder"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toStartOf="@+id/ibFlagged"
app:layout_constraintStart_toEndOf="@id/ivAvatar"
app:layout_constraintTop_toBottomOf="@id/tvSubject" />
<TextView <TextView
android:id="@+id/tvExpand" android:id="@+id/tvExpand"
android:layout_width="0dp" android:layout_width="0dp"
@ -251,7 +250,7 @@
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/paddingEnd" app:layout_constraintEnd_toStartOf="@+id/paddingEnd"
app:layout_constraintStart_toEndOf="@id/paddingStart" app:layout_constraintStart_toEndOf="@id/paddingStart"
app:layout_constraintTop_toBottomOf="@id/tvSubject" /> app:layout_constraintTop_toBottomOf="@id/tvFolder" />
<TextView <TextView
android:id="@+id/tvPreview" android:id="@+id/tvPreview"