Debuh: show max message send size

pull/212/head
M66B 2 years ago
parent 95079b7b70
commit cc06a8a673

@ -68,7 +68,8 @@ public class AdapterIdentitySelect extends ArrayAdapter<TupleIdentityEx> {
View vwColor = view.findViewById(R.id.vwColor); View vwColor = view.findViewById(R.id.vwColor);
TextView text1 = view.findViewById(android.R.id.text1); TextView text1 = view.findViewById(android.R.id.text1);
TextView text2 = view.findViewById(android.R.id.text2); TextView text2 = view.findViewById(android.R.id.text2);
TextView tvExtra = view.findViewById(R.id.tvExtra); TextView tvExtra1 = view.findViewById(R.id.tvExtra1);
TextView tvExtra2 = view.findViewById(R.id.tvExtra2);
vwColor.setBackgroundColor(identity.color == null ? Color.TRANSPARENT : identity.color); vwColor.setBackgroundColor(identity.color == null ? Color.TRANSPARENT : identity.color);
vwColor.setVisibility(hasColor ? View.VISIBLE : View.GONE); vwColor.setVisibility(hasColor ? View.VISIBLE : View.GONE);
@ -82,13 +83,16 @@ public class AdapterIdentitySelect extends ArrayAdapter<TupleIdentityEx> {
text2.setText(identity.accountName + ":" + identity.email); text2.setText(identity.accountName + ":" + identity.email);
} }
tvExtra.setText( tvExtra1.setText(identity.max_size == null ? null : Helper.humanReadableByteCount(identity.max_size));
tvExtra1.setVisibility(identity.max_size == null || !BuildConfig.DEBUG ? View.GONE : View.VISIBLE);
tvExtra2.setText(
(identity.cc == null ? "" : "+CC") + (identity.cc == null ? "" : "+CC") +
(identity.bcc == null ? "" : "+BCC") + (identity.bcc == null ? "" : "+BCC") +
(identity.replyto != null && !identity.replyto.equals(identity.email) ? "<<" : "")); (identity.replyto != null && !identity.replyto.equals(identity.email) ? "<<" : ""));
text2.setVisibility(single ? View.GONE : View.VISIBLE); text2.setVisibility(single ? View.GONE : View.VISIBLE);
tvExtra.setVisibility(identity.cc == null && identity.bcc == null ? View.GONE : View.VISIBLE); tvExtra2.setVisibility(identity.cc == null && identity.bcc == null ? View.GONE : View.VISIBLE);
return view; return view;
} }

@ -24,7 +24,7 @@
android:singleLine="true" android:singleLine="true"
android:text="Text1" android:text="Text1"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toStartOf="@+id/tvExtra1"
app:layout_constraintStart_toEndOf="@id/vwColor" app:layout_constraintStart_toEndOf="@id/vwColor"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -40,20 +40,33 @@
android:text="Text2" android:text="Text2"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/tvExtra" app:layout_constraintEnd_toStartOf="@+id/tvExtra2"
app:layout_constraintStart_toEndOf="@id/vwColor" app:layout_constraintStart_toEndOf="@id/vwColor"
app:layout_constraintTop_toBottomOf="@android:id/text1" /> app:layout_constraintTop_toBottomOf="@android:id/text1" />
<TextView <TextView
android:id="@+id/tvExtra" android:id="@+id/tvExtra1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
android:layout_marginBottom="6dp" android:layout_marginBottom="6dp"
android:text="Text2" android:text="Extra1"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@android:id/text1"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@android:id/text1" /> app:layout_constraintTop_toTopOf="@android:id/text1" />
<TextView
android:id="@+id/tvExtra2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:layout_marginBottom="6dp"
android:text="Extra2"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintBottom_toBottomOf="@android:id/text2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@android:id/text2" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
Loading…
Cancel
Save