Added option for wide color stripe

This commit is contained in:
M66B
2021-11-30 11:27:50 +01:00
parent 787599a3f8
commit a1934c48b7
12 changed files with 64 additions and 4 deletions

View File

@@ -226,6 +226,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private boolean suitable;
private boolean unmetered;
private int colorStripeWidth;
private int colorAccent;
private int textColorPrimary;
private int textColorSecondary;
@@ -670,6 +671,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibHelp = itemView.findViewById(R.id.ibHelp);
ibSettings = itemView.findViewById(R.id.ibSettings);
if (vwColor != null)
vwColor.getLayoutParams().width = colorStripeWidth;
if (tvFrom != null) {
if (compact) {
boolean full = "full".equals(sender_ellipsize);
@@ -5990,6 +5994,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
this.suitable = state.isSuitable();
this.unmetered = state.isUnmetered();
boolean color_stripe_wide = prefs.getBoolean("color_stripe_wide", false);
this.colorStripeWidth = Helper.dp2pixels(context, color_stripe_wide ? 12 : 6);
this.colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
this.textColorPrimary = Helper.resolveColor(context, android.R.attr.textColorPrimary);
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);