diff options
author | cyBerta <cyberta@riseup.net> | 2023-10-23 17:34:57 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-10-23 17:34:57 +0200 |
commit | 4e563004800af71d326077c8a4de4bee598fd336 (patch) | |
tree | 809f451b6d729d0a5bad0f0ef4017b94f97356e2 /app/src/main/java/se/leap/bitmaskclient/base/fragments/LogFragment.java | |
parent | 9ad95a20f7500e3b52ae0cc50609635e8c73205f (diff) |
tint actionbar subtitle and icons according to actionbar title color
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/base/fragments/LogFragment.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/fragments/LogFragment.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/LogFragment.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/LogFragment.java index c7dd25da..56b7259e 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/LogFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/LogFragment.java @@ -8,6 +8,7 @@ package se.leap.bitmaskclient.base.fragments; import static de.blinkt.openvpn.core.OpenVPNService.humanReadableByteCount; import static se.leap.bitmaskclient.R.string.log_fragment_title; import static se.leap.bitmaskclient.base.utils.ViewHelper.setActionBarSubtitle; +import static se.leap.bitmaskclient.base.utils.ViewHelper.setDefaultActivityBarColor; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -60,6 +61,7 @@ import de.blinkt.openvpn.core.VpnStatus.LogListener; import de.blinkt.openvpn.core.VpnStatus.StateListener; import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.base.utils.PreferenceHelper; +import se.leap.bitmaskclient.base.utils.ViewHelper; public class LogFragment extends ListFragment implements StateListener, SeekBar.OnSeekBarChangeListener, RadioGroup.OnCheckedChangeListener, VpnStatus.ByteCountListener { public static final String TAG = LogFragment.class.getSimpleName(); @@ -432,11 +434,11 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar. @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.f_log, menu); - if (getResources().getBoolean(R.bool.logSildersAlwaysVisible)) + ViewHelper.tintMenuIcons(getContext(), menu, R.color.colorActionBarTitleFont); + if (getResources().getBoolean(R.bool.logSlidersAlwaysVisible)) menu.removeItem(R.id.toggle_time); } - @Override public void onResume() { super.onResume(); @@ -522,7 +524,7 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar. mLogLevelSlider.setOnSeekBarChangeListener(this); - if (getResources().getBoolean(R.bool.logSildersAlwaysVisible)) + if (getResources().getBoolean(R.bool.logSlidersAlwaysVisible)) mOptionsLayout.setVisibility(View.VISIBLE); mUpStatus = v.findViewById(R.id.speedUp); @@ -532,6 +534,7 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar. mOptionsLayout.setVisibility(View.VISIBLE); setActionBarSubtitle(this, log_fragment_title); + setDefaultActivityBarColor(getActivity()); return v; } @@ -545,7 +548,7 @@ public class LogFragment extends ListFragment implements StateListener, SeekBar. @Override public void onAttach(Context context) { super.onAttach(context); - if (getResources().getBoolean(R.bool.logSildersAlwaysVisible)) { + if (getResources().getBoolean(R.bool.logSlidersAlwaysVisible)) { mShowOptionsLayout = true; if (mOptionsLayout != null) mOptionsLayout.setVisibility(View.VISIBLE); |