Half transparent nav warning color

This commit is contained in:
M66B 2021-09-02 08:53:59 +02:00
parent c460d8285d
commit 28067c53d8
3 changed files with 6 additions and 3 deletions

View File

@ -33,6 +33,7 @@ import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.core.graphics.ColorUtils;
import androidx.lifecycle.LifecycleOwner;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.preference.PreferenceManager;
@ -221,7 +222,7 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
this.colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
this.colorWarning = ColorUtils.setAlphaComponent(Helper.resolveColor(context, R.attr.colorWarning), 128);
this.TF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);

View File

@ -31,6 +31,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.graphics.ColorUtils;
import androidx.lifecycle.LifecycleOwner;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.preference.PreferenceManager;
@ -173,7 +174,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
int colorHighlight = prefs.getInt("highlight_color", Helper.resolveColor(context, R.attr.colorUnreadHighlight));
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
this.colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
this.colorWarning = ColorUtils.setAlphaComponent(Helper.resolveColor(context, R.attr.colorWarning), 128);
this.TF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);

View File

@ -31,6 +31,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.graphics.ColorUtils;
import androidx.lifecycle.LifecycleOwner;
import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.DiffUtil;
@ -147,7 +148,7 @@ public class AdapterNavMenu extends RecyclerView.Adapter<AdapterNavMenu.ViewHold
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
this.colorControlNormal = Helper.resolveColor(context, R.attr.colorControlNormal);
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
this.colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
this.colorWarning = ColorUtils.setAlphaComponent(Helper.resolveColor(context, R.attr.colorWarning), 128);
setHasStableIds(true);
}