mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 09:16:00 +00:00
Show attachment name with primary text color
This commit is contained in:
parent
c722e6f04a
commit
b561f62c26
2 changed files with 4 additions and 3 deletions
|
@ -76,7 +76,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
||||||
private boolean debug;
|
private boolean debug;
|
||||||
private int dp12;
|
private int dp12;
|
||||||
private int dp36;
|
private int dp36;
|
||||||
private int textColorTertiary;
|
private int textColorPrimary;
|
||||||
private int colorWarning;
|
private int colorWarning;
|
||||||
|
|
||||||
private List<EntityAttachment> items = new ArrayList<>();
|
private List<EntityAttachment> items = new ArrayList<>();
|
||||||
|
@ -169,7 +169,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
||||||
|
|
||||||
boolean dangerous = Helper.DANGEROUS_EXTENSIONS.contains(Helper.getExtension(attachment.name));
|
boolean dangerous = Helper.DANGEROUS_EXTENSIONS.contains(Helper.getExtension(attachment.name));
|
||||||
tvName.setText(attachment.name);
|
tvName.setText(attachment.name);
|
||||||
tvName.setTextColor(dangerous ? colorWarning : textColorTertiary);
|
tvName.setTextColor(dangerous ? colorWarning : textColorPrimary);
|
||||||
tvName.setTypeface(null, dangerous ? Typeface.BOLD : Typeface.NORMAL);
|
tvName.setTypeface(null, dangerous ? Typeface.BOLD : Typeface.NORMAL);
|
||||||
|
|
||||||
if (attachment.size != null)
|
if (attachment.size != null)
|
||||||
|
@ -547,7 +547,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
||||||
this.debug = prefs.getBoolean("debug", false);
|
this.debug = prefs.getBoolean("debug", false);
|
||||||
this.dp12 = Helper.dp2pixels(context, 12);
|
this.dp12 = Helper.dp2pixels(context, 12);
|
||||||
this.dp36 = Helper.dp2pixels(context, 36);
|
this.dp36 = Helper.dp2pixels(context, 36);
|
||||||
this.textColorTertiary = Helper.resolveColor(context, android.R.attr.textColorTertiary);
|
this.textColorPrimary = Helper.resolveColor(context, android.R.attr.textColorPrimary);
|
||||||
this.colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
|
this.colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
|
||||||
|
|
||||||
setHasStableIds(true);
|
setHasStableIds(true);
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
android:layout_marginEnd="6dp"
|
android:layout_marginEnd="6dp"
|
||||||
android:text="Name"
|
android:text="Name"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/ivStatus"
|
app:layout_constraintEnd_toStartOf="@+id/ivStatus"
|
||||||
app:layout_constraintHorizontal_weight="4"
|
app:layout_constraintHorizontal_weight="4"
|
||||||
app:layout_constraintStart_toEndOf="@id/ivType"
|
app:layout_constraintStart_toEndOf="@id/ivType"
|
||||||
|
|
Loading…
Reference in a new issue