Modernize settings UI
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<activity
|
||||
android:name=".shell.ui.MainActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.MoreNotis.NoActionBar">
|
||||
android:theme="@style/Theme.StatusBarTweak.NoActionBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
+2
@@ -19,6 +19,7 @@ final class NotificationSeenAppReporter {
|
||||
void report(Context context, ArrayList<SnapshotPlacement> placements) {
|
||||
if (context == null || placements == null || placements.isEmpty()) {
|
||||
activeKeysByPackage.clear();
|
||||
SbtSettings.setActiveIconApps(context, java.util.Collections.emptySet());
|
||||
return;
|
||||
}
|
||||
long now = System.currentTimeMillis();
|
||||
@@ -45,6 +46,7 @@ final class NotificationSeenAppReporter {
|
||||
}
|
||||
activeKeysByPackage.clear();
|
||||
activeKeysByPackage.putAll(currentKeysByPackage);
|
||||
SbtSettings.setActiveIconApps(context, currentKeysByPackage.keySet());
|
||||
}
|
||||
|
||||
private boolean wasAlreadyActive(String packageName, String key) {
|
||||
|
||||
@@ -22,6 +22,7 @@ public final class AppIconRules {
|
||||
public static final String PREF_KEY_BLOCKED_MODES = "app_icon_blocked_modes";
|
||||
public static final String PREF_KEY_EXCEPTION_RULES = "app_icon_exception_rules";
|
||||
public static final String PREF_KEY_SEEN_SESSION = "app_icon_seen_session";
|
||||
public static final String PREF_KEY_ACTIVE_SESSION = "app_icon_active_session";
|
||||
|
||||
public static final String EXTRA_PACKAGE = "package";
|
||||
public static final String EXTRA_FIRST_SEEN_MS = "first_seen_ms";
|
||||
@@ -93,6 +94,28 @@ public final class AppIconRules {
|
||||
prefs.edit().remove(PREF_KEY_SEEN_SESSION).apply();
|
||||
}
|
||||
|
||||
public static Set<String> loadActiveSession(SharedPreferences prefs) {
|
||||
HashSet<String> out = new HashSet<>();
|
||||
for (String pkg : readStringSet(prefs, PREF_KEY_ACTIVE_SESSION)) {
|
||||
if (isValidPackageName(pkg)) {
|
||||
out.add(pkg);
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
public static void saveActiveSession(SharedPreferences prefs, Set<String> packages) {
|
||||
HashSet<String> out = new HashSet<>();
|
||||
if (packages != null) {
|
||||
for (String pkg : packages) {
|
||||
if (isValidPackageName(pkg)) {
|
||||
out.add(pkg);
|
||||
}
|
||||
}
|
||||
}
|
||||
writeStringSet(prefs, PREF_KEY_ACTIVE_SESSION, out);
|
||||
}
|
||||
|
||||
private static Set<String> readStringSet(SharedPreferences prefs, String key) {
|
||||
if (prefs == null) {
|
||||
return Collections.emptySet();
|
||||
|
||||
@@ -1082,6 +1082,38 @@ public final class SbtSettings {
|
||||
}
|
||||
}
|
||||
|
||||
public static void setActiveIconApps(Context context, Set<String> packageNames) {
|
||||
if (context == null) {
|
||||
return;
|
||||
}
|
||||
HashSet<String> safePackages = new HashSet<>();
|
||||
if (packageNames != null) {
|
||||
for (String packageName : packageNames) {
|
||||
if (AppIconRules.isValidPackageName(packageName)) {
|
||||
safePackages.add(packageName);
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (!MODULE_PACKAGE.equals(context.getPackageName()) && hasSettingsProvider(context)) {
|
||||
Bundle extras = new Bundle();
|
||||
extras.putStringArrayList(
|
||||
SbtSettingsProvider.EXTRA_VALUE,
|
||||
new ArrayList<>(safePackages));
|
||||
context.getContentResolver()
|
||||
.call(settingsProviderUri(),
|
||||
SbtSettingsProvider.METHOD_SET_ACTIVE_ICON_APPS,
|
||||
null,
|
||||
extras);
|
||||
return;
|
||||
}
|
||||
SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
|
||||
AppIconRules.saveActiveSession(prefs, safePackages);
|
||||
} catch (Throwable ignored) {
|
||||
// This list is advisory UI state; rendering should never fail because it cannot be updated.
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean hasSettingsProvider(Context context) {
|
||||
if (context == null) {
|
||||
return false;
|
||||
|
||||
@@ -19,6 +19,7 @@ public class SbtSettingsProvider extends ContentProvider {
|
||||
public static final String METHOD_GET_ALL = "get_all";
|
||||
public static final String METHOD_SET_CLOCK_CAMERA_DEBUG_STATE = "set_clock_camera_debug_state";
|
||||
public static final String METHOD_NOTE_SEEN_ICON_APP = "note_seen_icon_app";
|
||||
public static final String METHOD_SET_ACTIVE_ICON_APPS = "set_active_icon_apps";
|
||||
public static final String EXTRA_VALUE = "value";
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
@@ -441,6 +442,17 @@ public class SbtSettingsProvider extends ContentProvider {
|
||||
}
|
||||
return Bundle.EMPTY;
|
||||
}
|
||||
if (METHOD_SET_ACTIVE_ICON_APPS.equals(method)) {
|
||||
ArrayList<String> packages = extras != null
|
||||
? extras.getStringArrayList(EXTRA_VALUE)
|
||||
: null;
|
||||
synchronized (LOCK) {
|
||||
AppIconRules.saveActiveSession(
|
||||
prefs,
|
||||
packages != null ? new java.util.HashSet<>(packages) : Collections.emptySet());
|
||||
}
|
||||
return Bundle.EMPTY;
|
||||
}
|
||||
if (METHOD_SET_CLOCK_CAMERA_DEBUG_STATE.equals(method)) {
|
||||
String cameraId = extras != null ? extras.getString(SbtSettings.KEY_DEBUG_CURRENT_CAMERA_ID, "") : "";
|
||||
String autoType = extras != null ? extras.getString(SbtSettings.KEY_DEBUG_CURRENT_CAMERA_AUTO_TYPE, "") : "";
|
||||
|
||||
@@ -2,6 +2,7 @@ package se.ajpanton.statusbartweak.shell.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
@@ -20,6 +21,7 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
@@ -283,6 +285,7 @@ public final class BatteryBarFragment extends Fragment {
|
||||
if (button == null) {
|
||||
return;
|
||||
}
|
||||
ViewTreeSupport.styleStepperButton(button);
|
||||
button.setMinHeight(0);
|
||||
button.setMinimumHeight(0);
|
||||
button.setPadding(button.getPaddingLeft(), 0, button.getPaddingRight(), 0);
|
||||
@@ -329,6 +332,8 @@ public final class BatteryBarFragment extends Fragment {
|
||||
int max,
|
||||
int fallback) {
|
||||
final boolean[] updating = new boolean[]{false};
|
||||
ViewTreeSupport.styleStepperButton(minus);
|
||||
ViewTreeSupport.styleStepperButton(plus);
|
||||
if (minus != null) {
|
||||
minus.setOnClickListener(v -> {
|
||||
int current = ViewTreeSupport.parseInt(input, prefs.getInt(key, fallback));
|
||||
@@ -379,16 +384,27 @@ public final class BatteryBarFragment extends Fragment {
|
||||
return;
|
||||
}
|
||||
container.removeAllViews();
|
||||
for (BatteryBarGeometry.Scenario scenario : BatteryBarGeometry.Scenario.values()) {
|
||||
addScenarioOverrideRow(container, prefs, scenario, scenarioLabelRes(scenario));
|
||||
}
|
||||
addScenarioOverrideRow(container, prefs, new ScenarioGroup(
|
||||
R.string.battery_bar_scenario_group_unlocked,
|
||||
BatteryBarGeometry.Scenario.UNLOCKED_PORTRAIT,
|
||||
BatteryBarGeometry.Scenario.UNLOCKED_LANDSCAPE));
|
||||
addScenarioOverrideRow(container, prefs, new ScenarioGroup(
|
||||
R.string.battery_bar_scenario_group_transparent,
|
||||
BatteryBarGeometry.Scenario.TRANSPARENT_PORTRAIT,
|
||||
BatteryBarGeometry.Scenario.TRANSPARENT_LANDSCAPE));
|
||||
addScenarioOverrideRow(container, prefs, new ScenarioGroup(
|
||||
R.string.battery_bar_scenario_group_fullscreen,
|
||||
BatteryBarGeometry.Scenario.FULLSCREEN_PORTRAIT,
|
||||
BatteryBarGeometry.Scenario.FULLSCREEN_LANDSCAPE));
|
||||
addScenarioOverrideRow(container, prefs, new ScenarioGroup(
|
||||
R.string.battery_bar_lockscreen_override,
|
||||
BatteryBarGeometry.Scenario.LOCKSCREEN));
|
||||
}
|
||||
|
||||
private void addScenarioOverrideRow(
|
||||
LinearLayout container,
|
||||
SharedPreferences prefs,
|
||||
BatteryBarGeometry.Scenario scenario,
|
||||
int labelRes
|
||||
ScenarioGroup scenarioGroup
|
||||
) {
|
||||
Context context = container.getContext();
|
||||
LinearLayout row = new LinearLayout(context);
|
||||
@@ -408,7 +424,7 @@ public final class BatteryBarFragment extends Fragment {
|
||||
1f));
|
||||
|
||||
SwitchMaterial enabledSwitch = new SwitchMaterial(context);
|
||||
enabledSwitch.setText(labelRes);
|
||||
enabledSwitch.setText(scenarioGroup.labelRes());
|
||||
enabledSwitch.setLayoutParams(new LinearLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
@@ -425,80 +441,57 @@ public final class BatteryBarFragment extends Fragment {
|
||||
row.addView(textColumn);
|
||||
row.addView(editButton);
|
||||
container.addView(row);
|
||||
bindScenarioOverride(scenario, labelRes, enabledSwitch, editButton, summary, prefs);
|
||||
}
|
||||
|
||||
private int scenarioLabelRes(BatteryBarGeometry.Scenario scenario) {
|
||||
if (scenario == BatteryBarGeometry.Scenario.UNLOCKED_LANDSCAPE) {
|
||||
return R.string.battery_bar_unlocked_landscape_override;
|
||||
}
|
||||
if (scenario == BatteryBarGeometry.Scenario.TRANSPARENT_PORTRAIT) {
|
||||
return R.string.battery_bar_transparent_portrait_override;
|
||||
}
|
||||
if (scenario == BatteryBarGeometry.Scenario.TRANSPARENT_LANDSCAPE) {
|
||||
return R.string.battery_bar_transparent_landscape_override;
|
||||
}
|
||||
if (scenario == BatteryBarGeometry.Scenario.FULLSCREEN_PORTRAIT) {
|
||||
return R.string.battery_bar_fullscreen_portrait_override;
|
||||
}
|
||||
if (scenario == BatteryBarGeometry.Scenario.FULLSCREEN_LANDSCAPE) {
|
||||
return R.string.battery_bar_fullscreen_landscape_override;
|
||||
}
|
||||
if (scenario == BatteryBarGeometry.Scenario.LOCKSCREEN) {
|
||||
return R.string.battery_bar_lockscreen_override;
|
||||
}
|
||||
return R.string.battery_bar_unlocked_portrait_override;
|
||||
bindScenarioOverride(scenarioGroup, enabledSwitch, editButton, summary, prefs);
|
||||
}
|
||||
|
||||
private void bindScenarioOverride(
|
||||
BatteryBarGeometry.Scenario scenario,
|
||||
int labelRes,
|
||||
ScenarioGroup scenarioGroup,
|
||||
SwitchMaterial enabledSwitch,
|
||||
MaterialButton editButton,
|
||||
TextView summary,
|
||||
SharedPreferences prefs
|
||||
) {
|
||||
if (scenario == null || prefs == null) {
|
||||
if (scenarioGroup == null || prefs == null) {
|
||||
return;
|
||||
}
|
||||
String enabledKey = BatteryBarGeometry.enabledKey(scenario);
|
||||
boolean enabled = prefs.getBoolean(enabledKey, false);
|
||||
boolean enabled = scenarioGroupEnabled(prefs, scenarioGroup);
|
||||
if (enabledSwitch != null) {
|
||||
enabledSwitch.setChecked(enabled);
|
||||
enabledSwitch.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
SharedPreferences.Editor editor = prefs.edit().putBoolean(enabledKey, isChecked);
|
||||
if (isChecked && !prefs.contains(BatteryBarGeometry.valueKey(scenario))) {
|
||||
editor.putString(
|
||||
BatteryBarGeometry.valueKey(scenario),
|
||||
globalGeometryFromPrefs(prefs).encode());
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
BatteryBarGeometry geometry = scenarioGroupGeometryFromPrefs(prefs, scenarioGroup);
|
||||
for (BatteryBarGeometry.Scenario scenario : scenarioGroup.scenarios()) {
|
||||
editor.putBoolean(BatteryBarGeometry.enabledKey(scenario), isChecked);
|
||||
if (isChecked) {
|
||||
editor.putString(BatteryBarGeometry.valueKey(scenario), geometry.encode());
|
||||
}
|
||||
}
|
||||
editor.apply();
|
||||
SbtSettings.ensureReadable(requireContext());
|
||||
updateScenarioSummary(scenario, summary, editButton, prefs);
|
||||
updateScenarioSummary(scenarioGroup, summary, editButton, prefs);
|
||||
});
|
||||
}
|
||||
if (editButton != null) {
|
||||
editButton.setOnClickListener(v -> showScenarioGeometryDialog(
|
||||
scenario,
|
||||
labelRes,
|
||||
scenarioGroup,
|
||||
prefs,
|
||||
summary,
|
||||
editButton));
|
||||
}
|
||||
updateScenarioSummary(scenario, summary, editButton, prefs);
|
||||
updateScenarioSummary(scenarioGroup, summary, editButton, prefs);
|
||||
}
|
||||
|
||||
private void updateScenarioSummary(
|
||||
BatteryBarGeometry.Scenario scenario,
|
||||
ScenarioGroup scenarioGroup,
|
||||
TextView summary,
|
||||
MaterialButton editButton,
|
||||
SharedPreferences prefs
|
||||
) {
|
||||
if (scenario == null || prefs == null) {
|
||||
if (scenarioGroup == null || prefs == null) {
|
||||
return;
|
||||
}
|
||||
boolean enabled = prefs.getBoolean(BatteryBarGeometry.enabledKey(scenario), false);
|
||||
BatteryBarGeometry geometry = scenarioGeometryFromPrefs(prefs, scenario);
|
||||
boolean enabled = scenarioGroupEnabled(prefs, scenarioGroup);
|
||||
BatteryBarGeometry geometry = scenarioGroupGeometryFromPrefs(prefs, scenarioGroup);
|
||||
if (summary != null) {
|
||||
summary.setText(getString(
|
||||
R.string.battery_bar_override_summary,
|
||||
@@ -512,6 +505,18 @@ public final class BatteryBarFragment extends Fragment {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean scenarioGroupEnabled(SharedPreferences prefs, ScenarioGroup scenarioGroup) {
|
||||
if (prefs == null || scenarioGroup == null) {
|
||||
return false;
|
||||
}
|
||||
for (BatteryBarGeometry.Scenario scenario : scenarioGroup.scenarios()) {
|
||||
if (prefs.getBoolean(BatteryBarGeometry.enabledKey(scenario), false)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private BatteryBarGeometry globalGeometryFromPrefs(SharedPreferences prefs) {
|
||||
return new BatteryBarGeometry(
|
||||
prefs.getString(
|
||||
@@ -534,14 +539,28 @@ public final class BatteryBarFragment extends Fragment {
|
||||
globalGeometryFromPrefs(prefs));
|
||||
}
|
||||
|
||||
private BatteryBarGeometry scenarioGroupGeometryFromPrefs(
|
||||
SharedPreferences prefs,
|
||||
ScenarioGroup scenarioGroup
|
||||
) {
|
||||
if (prefs == null || scenarioGroup == null) {
|
||||
return globalGeometryFromPrefs(prefs);
|
||||
}
|
||||
for (BatteryBarGeometry.Scenario scenario : scenarioGroup.scenarios()) {
|
||||
if (prefs.contains(BatteryBarGeometry.valueKey(scenario))) {
|
||||
return scenarioGeometryFromPrefs(prefs, scenario);
|
||||
}
|
||||
}
|
||||
return globalGeometryFromPrefs(prefs);
|
||||
}
|
||||
|
||||
private void showScenarioGeometryDialog(
|
||||
BatteryBarGeometry.Scenario scenario,
|
||||
int labelRes,
|
||||
ScenarioGroup scenarioGroup,
|
||||
SharedPreferences prefs,
|
||||
TextView summary,
|
||||
MaterialButton editButton
|
||||
) {
|
||||
BatteryBarGeometry current = scenarioGeometryFromPrefs(prefs, scenario);
|
||||
BatteryBarGeometry current = scenarioGroupGeometryFromPrefs(prefs, scenarioGroup);
|
||||
LinearLayout content = new LinearLayout(requireContext());
|
||||
content.setOrientation(LinearLayout.VERTICAL);
|
||||
int padding = Math.round(20 * getResources().getDisplayMetrics().density);
|
||||
@@ -574,11 +593,11 @@ public final class BatteryBarFragment extends Fragment {
|
||||
content.addView(dialogLabel(R.string.battery_bar_thickness_title));
|
||||
content.addView(thicknessInput);
|
||||
|
||||
new MaterialAlertDialogBuilder(requireContext())
|
||||
.setTitle(getString(R.string.battery_bar_override_dialog_title, getString(labelRes)))
|
||||
androidx.appcompat.app.AlertDialog dialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setTitle(getString(R.string.battery_bar_override_dialog_title, getString(scenarioGroup.labelRes())))
|
||||
.setView(content)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
|
||||
.setPositiveButton(android.R.string.ok, (dialogInterface, which) -> {
|
||||
BatteryBarGeometry updated = new BatteryBarGeometry(
|
||||
positionBottom.isChecked() ? "bottom" : "top",
|
||||
alignmentRtl.isChecked()
|
||||
@@ -588,13 +607,22 @@ public final class BatteryBarFragment extends Fragment {
|
||||
ViewTreeSupport.parseInt(thicknessInput, current.thicknessDp),
|
||||
SbtDefaults.BATTERY_BAR_THICKNESS_DP_MIN,
|
||||
SbtDefaults.BATTERY_BAR_THICKNESS_DP_MAX));
|
||||
prefs.edit()
|
||||
.putString(BatteryBarGeometry.valueKey(scenario), updated.encode())
|
||||
.apply();
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
for (BatteryBarGeometry.Scenario scenario : scenarioGroup.scenarios()) {
|
||||
editor.putString(BatteryBarGeometry.valueKey(scenario), updated.encode());
|
||||
}
|
||||
editor.apply();
|
||||
SbtSettings.ensureReadable(requireContext());
|
||||
updateScenarioSummary(scenario, summary, editButton, prefs);
|
||||
updateScenarioSummary(scenarioGroup, summary, editButton, prefs);
|
||||
})
|
||||
.show();
|
||||
tintDialogButtons(dialog, requireContext());
|
||||
}
|
||||
|
||||
private record ScenarioGroup(
|
||||
int labelRes,
|
||||
BatteryBarGeometry.Scenario... scenarios
|
||||
) {
|
||||
}
|
||||
|
||||
private TextView dialogLabel(int resId) {
|
||||
@@ -745,12 +773,13 @@ public final class BatteryBarFragment extends Fragment {
|
||||
rowParams.topMargin = ViewTreeSupport.dp(context, 12);
|
||||
row.setLayoutParams(rowParams);
|
||||
|
||||
TextView title = new TextView(context);
|
||||
title.setText(getString(R.string.battery_bar_threshold_label, threshold.percent));
|
||||
row.addView(title);
|
||||
LinearLayout headerRow = new LinearLayout(context);
|
||||
headerRow.setOrientation(LinearLayout.HORIZONTAL);
|
||||
headerRow.setGravity(Gravity.CENTER_VERTICAL);
|
||||
row.addView(headerRow);
|
||||
|
||||
MaterialButton percentButton = createRowButton(context);
|
||||
percentButton.setText(getString(R.string.battery_bar_threshold_change_percent));
|
||||
percentButton.setText(getString(R.string.battery_bar_threshold_label, threshold.percent));
|
||||
percentButton.setOnClickListener(v -> showThresholdPercentDialog(
|
||||
threshold,
|
||||
prefs,
|
||||
@@ -771,7 +800,27 @@ public final class BatteryBarFragment extends Fragment {
|
||||
showMessageDialog(R.string.battery_bar_threshold_reordered);
|
||||
}
|
||||
}));
|
||||
row.addView(percentButton);
|
||||
headerRow.addView(percentButton, new LinearLayout.LayoutParams(
|
||||
0,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
1f));
|
||||
|
||||
MaterialButton removeButton = createRowButton(context);
|
||||
removeButton.setText("X");
|
||||
removeButton.setTextColor(ContextCompat.getColor(context, android.R.color.white));
|
||||
removeButton.setBackgroundTintList(ColorStateList.valueOf(
|
||||
ContextCompat.getColor(context, R.color.sbt_danger)));
|
||||
removeButton.setOnClickListener(v -> {
|
||||
ArrayList<BatteryBarStyle.Threshold> updated = loadThresholds(prefs);
|
||||
removeThreshold(updated, originalPercent);
|
||||
persistThresholds(prefs, updated);
|
||||
renderThresholdRows(container, prefs);
|
||||
});
|
||||
LinearLayout.LayoutParams removeParams = new LinearLayout.LayoutParams(
|
||||
ViewTreeSupport.dp(context, 44),
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
removeParams.leftMargin = ViewTreeSupport.dp(context, 8);
|
||||
headerRow.addView(removeButton, removeParams);
|
||||
|
||||
MaterialButton dischargeButton = createRowButton(context);
|
||||
updateColourButtonLabel(
|
||||
@@ -799,16 +848,6 @@ public final class BatteryBarFragment extends Fragment {
|
||||
container));
|
||||
row.addView(chargeButton);
|
||||
|
||||
MaterialButton removeButton = createRowButton(context);
|
||||
removeButton.setText(getString(R.string.battery_bar_threshold_remove));
|
||||
removeButton.setOnClickListener(v -> {
|
||||
ArrayList<BatteryBarStyle.Threshold> updated = loadThresholds(prefs);
|
||||
removeThreshold(updated, originalPercent);
|
||||
persistThresholds(prefs, updated);
|
||||
renderThresholdRows(container, prefs);
|
||||
});
|
||||
row.addView(removeButton);
|
||||
|
||||
container.addView(row);
|
||||
}
|
||||
}
|
||||
@@ -988,6 +1027,7 @@ public final class BatteryBarFragment extends Fragment {
|
||||
consumer.accept(BatteryBarStyle.normalizeColor(raw));
|
||||
})
|
||||
.show();
|
||||
tintDialogButtons(dialog, context);
|
||||
if (sameAsDischargeButton != null) {
|
||||
MaterialButton finalSameAsDischargeButton = sameAsDischargeButton;
|
||||
finalSameAsDischargeButton.setOnClickListener(v -> {
|
||||
@@ -1031,14 +1071,35 @@ public final class BatteryBarFragment extends Fragment {
|
||||
consumer.accept(percent);
|
||||
})
|
||||
.show();
|
||||
tintDialogButtons(dialog, context);
|
||||
focusInput(dialog, input);
|
||||
}
|
||||
|
||||
private void showMessageDialog(int messageRes) {
|
||||
new MaterialAlertDialogBuilder(requireContext())
|
||||
androidx.appcompat.app.AlertDialog dialog = new MaterialAlertDialogBuilder(requireContext())
|
||||
.setMessage(messageRes)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.show();
|
||||
tintDialogButtons(dialog, requireContext());
|
||||
}
|
||||
|
||||
private void tintDialogButtons(androidx.appcompat.app.AlertDialog dialog, Context context) {
|
||||
if (dialog == null || context == null) {
|
||||
return;
|
||||
}
|
||||
int color = ContextCompat.getColor(context, R.color.sbt_accent_dark);
|
||||
android.widget.Button positive = dialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE);
|
||||
android.widget.Button negative = dialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE);
|
||||
android.widget.Button neutral = dialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_NEUTRAL);
|
||||
if (positive != null) {
|
||||
positive.setTextColor(color);
|
||||
}
|
||||
if (negative != null) {
|
||||
negative.setTextColor(color);
|
||||
}
|
||||
if (neutral != null) {
|
||||
neutral.setTextColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
private void setIntInput(EditText input, int value) {
|
||||
|
||||
+8
-1
@@ -19,6 +19,9 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import se.ajpanton.statusbartweak.R;
|
||||
import se.ajpanton.statusbartweak.shell.settings.AppIconRules;
|
||||
@@ -100,7 +103,11 @@ public class BlockAppNotificationIconsFragment extends Fragment {
|
||||
if (prefs == null) {
|
||||
return;
|
||||
}
|
||||
AppIconRules.clearSeenSession(prefs);
|
||||
Map<String, AppIconRules.SeenApp> seen = AppIconRules.loadSeenSession(prefs);
|
||||
Set<String> keep = new HashSet<>(AppIconRules.loadBlockedModes(prefs).keySet());
|
||||
keep.addAll(AppIconRules.loadActiveSession(prefs));
|
||||
seen.keySet().removeIf(pkg -> !keep.contains(pkg));
|
||||
AppIconRules.saveSeenSession(prefs, seen);
|
||||
SbtSettings.ensureReadable(requireContext());
|
||||
}
|
||||
|
||||
|
||||
@@ -256,18 +256,19 @@ final class HiddenAppsUiSupport {
|
||||
exceptionsList.post(() -> exceptionsList.scrollToPosition(pos));
|
||||
});
|
||||
|
||||
Runnable revertDefaults = () -> {
|
||||
if (row.blockAod != originalModes[MODE_INDEX_AOD]
|
||||
|| row.blockLock != originalModes[MODE_INDEX_LOCK]
|
||||
|| row.blockUnlock != originalModes[MODE_INDEX_UNLOCK]) {
|
||||
row.blockAod = originalModes[MODE_INDEX_AOD];
|
||||
row.blockLock = originalModes[MODE_INDEX_LOCK];
|
||||
row.blockUnlock = originalModes[MODE_INDEX_UNLOCK];
|
||||
notifyRowChanged(rowChangedListener, row);
|
||||
}
|
||||
};
|
||||
androidx.appcompat.app.AlertDialog dialog = new MaterialAlertDialogBuilder(context)
|
||||
.setView(content)
|
||||
.setNegativeButton(android.R.string.cancel, (d, w) -> {
|
||||
if (row.blockAod != originalModes[MODE_INDEX_AOD]
|
||||
|| row.blockLock != originalModes[MODE_INDEX_LOCK]
|
||||
|| row.blockUnlock != originalModes[MODE_INDEX_UNLOCK]) {
|
||||
row.blockAod = originalModes[MODE_INDEX_AOD];
|
||||
row.blockLock = originalModes[MODE_INDEX_LOCK];
|
||||
row.blockUnlock = originalModes[MODE_INDEX_UNLOCK];
|
||||
notifyRowChanged(rowChangedListener, row);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, (d, w) -> revertDefaults.run())
|
||||
.setPositiveButton(android.R.string.ok, (dlg, which) -> {
|
||||
row.blockAod = defaultModes[MODE_INDEX_AOD];
|
||||
row.blockLock = defaultModes[MODE_INDEX_LOCK];
|
||||
@@ -276,7 +277,8 @@ final class HiddenAppsUiSupport {
|
||||
notifyRowChanged(rowChangedListener, row);
|
||||
})
|
||||
.show();
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
dialog.setOnCancelListener(d -> revertDefaults.run());
|
||||
if (dialog.getWindow() != null) {
|
||||
dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||
dialog.getWindow().setSoftInputMode(
|
||||
@@ -879,15 +881,18 @@ final class HiddenAppsUiSupport {
|
||||
int small = Math.round(2f * context.getResources().getDisplayMetrics().density);
|
||||
Button pos = dialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_POSITIVE);
|
||||
Button neg = dialog.getButton(androidx.appcompat.app.AlertDialog.BUTTON_NEGATIVE);
|
||||
int actionColor = ContextCompat.getColor(context, R.color.sbt_accent_dark);
|
||||
if (pos != null) {
|
||||
pos.setMinHeight(0);
|
||||
pos.setMinimumHeight(0);
|
||||
pos.setPadding(pos.getPaddingLeft(), small, pos.getPaddingRight(), small);
|
||||
pos.setTextColor(actionColor);
|
||||
}
|
||||
if (neg != null) {
|
||||
neg.setMinHeight(0);
|
||||
neg.setMinimumHeight(0);
|
||||
neg.setPadding(neg.getPaddingLeft(), small, neg.getPaddingRight(), small);
|
||||
neg.setTextColor(actionColor);
|
||||
}
|
||||
if (pos != null) {
|
||||
ViewParent p = pos.getParent();
|
||||
|
||||
@@ -75,6 +75,10 @@ public class IconsDebugFragment extends Fragment {
|
||||
currentCount = DebugNotifications.getDesiredCount(requireContext());
|
||||
updateCountLabel();
|
||||
bindCycleSwitch(cycleIconsSwitch);
|
||||
styleCompactCounterButton(minus10);
|
||||
styleCompactCounterButton(minus1);
|
||||
styleCompactCounterButton(plus1);
|
||||
styleCompactCounterButton(plus10);
|
||||
|
||||
minus10.setOnClickListener(v -> adjustCount(-10));
|
||||
minus1.setOnClickListener(v -> adjustCount(-1));
|
||||
@@ -183,6 +187,10 @@ public class IconsDebugFragment extends Fragment {
|
||||
return root;
|
||||
}
|
||||
|
||||
private void styleCompactCounterButton(MaterialButton button) {
|
||||
ViewTreeSupport.styleCompactButtonText(button, 13f);
|
||||
}
|
||||
|
||||
private void bindRestartSystemUiButton(MaterialButton restartButton) {
|
||||
if (restartButton == null) {
|
||||
return;
|
||||
|
||||
@@ -530,9 +530,14 @@ public final class LayoutFragment extends Fragment {
|
||||
return;
|
||||
}
|
||||
|
||||
group.setSaveEnabled(false);
|
||||
group.setSaveFromParentEnabled(false);
|
||||
ViewTreeSupport.balanceHorizontalRadioGroup(requireContext(), group);
|
||||
group.check(positionIdForValue(groupId, prefs.getString(positionKey, positionDefault)));
|
||||
boolean autoNearestAvailable = autoNearestKey != null && autoNearest != null;
|
||||
if (autoNearestAvailable) {
|
||||
autoNearest.setSaveEnabled(false);
|
||||
autoNearest.setSaveFromParentEnabled(false);
|
||||
autoNearest.setChecked(prefs.getBoolean(autoNearestKey, true));
|
||||
} else if (autoNearest != null) {
|
||||
autoNearest.setChecked(false);
|
||||
@@ -556,6 +561,9 @@ public final class LayoutFragment extends Fragment {
|
||||
|
||||
RadioGroup sideGroup = resolveMiddleSideGroup(root, groupId);
|
||||
if (sideGroup != null) {
|
||||
sideGroup.setSaveEnabled(false);
|
||||
sideGroup.setSaveFromParentEnabled(false);
|
||||
ViewTreeSupport.balanceHorizontalRadioGroup(requireContext(), sideGroup);
|
||||
sideGroup.check(sideIdForValue(sideGroup, prefs.getString(middleSideKey, "left")));
|
||||
sideGroup.setOnCheckedChangeListener((g, checkedId) -> {
|
||||
prefs.edit().putString(middleSideKey, checkedId == resolveRightSideId(g) ? "right" : "left").apply();
|
||||
@@ -634,10 +642,18 @@ public final class LayoutFragment extends Fragment {
|
||||
return;
|
||||
}
|
||||
int startValue = ViewTreeSupport.clamp(key != null ? prefs.getInt(key, initialValue) : initialValue, minValue, maxValue);
|
||||
input.setSaveEnabled(false);
|
||||
input.setSaveFromParentEnabled(false);
|
||||
input.setFilters(new InputFilter[]{new InputFilter.LengthFilter(4)});
|
||||
setNumericText(input, startValue);
|
||||
final boolean[] updating = new boolean[]{false};
|
||||
|
||||
ViewTreeSupport.styleStepperButton(minusFastButton);
|
||||
ViewTreeSupport.styleStepperButton(minusButton);
|
||||
ViewTreeSupport.styleStepperButton(plusButton);
|
||||
ViewTreeSupport.styleStepperButton(plusFastButton);
|
||||
ViewTreeSupport.styleStepperButton(resetButton);
|
||||
|
||||
bindStepperButton(prefs, key, input, updating, minusFastButton, -5, minValue, maxValue);
|
||||
bindStepperButton(prefs, key, input, updating, minusButton, -1, minValue, maxValue);
|
||||
bindStepperButton(prefs, key, input, updating, plusButton, 1, minValue, maxValue);
|
||||
|
||||
@@ -56,6 +56,7 @@ final class LayoutOrderingUi {
|
||||
addSortButton(context, sortGroup, R.string.layout_sort_icons_stock, "stock");
|
||||
addSortButton(context, sortGroup, R.string.layout_sort_icons_reversed, "reversed");
|
||||
addSortButton(context, sortGroup, R.string.layout_sort_icons_automatic, "automatic");
|
||||
ViewTreeSupport.balanceHorizontalRadioGroup(context, sortGroup);
|
||||
sortGroup.check(idForTag(sortGroup, prefs.getString(
|
||||
SbtSettings.KEY_LAYOUT_NOTIF_SORT_ORDER,
|
||||
SbtDefaults.LAYOUT_NOTIF_SORT_ORDER_DEFAULT)));
|
||||
@@ -206,9 +207,8 @@ final class LayoutOrderingUi {
|
||||
button.setSingleLine(true);
|
||||
button.setMaxLines(1);
|
||||
group.addView(button, new RadioGroup.LayoutParams(
|
||||
0,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
1f));
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
}
|
||||
|
||||
private static int idForTag(RadioGroup group, @Nullable String tag) {
|
||||
|
||||
@@ -439,11 +439,13 @@ final class LayoutSectionCopySupport {
|
||||
LinearLayout.LayoutParams spinnerParams = new LinearLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
spinnerParams.gravity = android.view.Gravity.CENTER_VERTICAL;
|
||||
row.addView(spinner, spinnerParams);
|
||||
LinearLayout.LayoutParams rowParams = new LinearLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
rowParams.leftMargin = ViewTreeSupport.dp(context, 12);
|
||||
rowParams.gravity = android.view.Gravity.CENTER_VERTICAL;
|
||||
if (parent.getOrientation() == LinearLayout.HORIZONTAL) {
|
||||
parent.addView(row, rowParams);
|
||||
} else {
|
||||
|
||||
@@ -205,6 +205,7 @@ public class SystemIconsFragment extends Fragment {
|
||||
TextView selected = new TextView(context);
|
||||
selected.setText(labels[indexForDualSimSignalMode(current)]);
|
||||
selected.setTextAppearance(com.google.android.material.R.style.TextAppearance_MaterialComponents_Body1);
|
||||
selected.setGravity(Gravity.END | Gravity.CENTER_VERTICAL);
|
||||
selected.setSingleLine(true);
|
||||
selected.setEllipsize(TextUtils.TruncateAt.END);
|
||||
LinearLayout.LayoutParams selectedParams = new LinearLayout.LayoutParams(
|
||||
@@ -260,9 +261,9 @@ public class SystemIconsFragment extends Fragment {
|
||||
item.setTextAppearance(com.google.android.material.R.style.TextAppearance_MaterialComponents_Body1);
|
||||
item.setSingleLine(true);
|
||||
item.setPadding(
|
||||
0,
|
||||
ViewTreeSupport.dp(context, 12),
|
||||
0,
|
||||
ViewTreeSupport.dp(context, 12),
|
||||
ViewTreeSupport.dp(context, 8),
|
||||
ViewTreeSupport.dp(context, 12));
|
||||
content.addView(item, new LinearLayout.LayoutParams(
|
||||
Math.max(anchor.getWidth(), ViewTreeSupport.dp(context, MODE_TOGGLE_COLUMN_DP)),
|
||||
|
||||
@@ -9,6 +9,9 @@ import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Space;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
@@ -20,6 +23,8 @@ import se.ajpanton.statusbartweak.R;
|
||||
import se.ajpanton.statusbartweak.shell.settings.SbtSettings;
|
||||
|
||||
final class ViewTreeSupport {
|
||||
static final String DEFAULT_SYMBOL = "\u21ba";
|
||||
|
||||
private ViewTreeSupport() {
|
||||
}
|
||||
|
||||
@@ -123,9 +128,54 @@ final class ViewTreeSupport {
|
||||
button.setMinWidth(dp(context, 40));
|
||||
button.setMinHeight(dp(context, 40));
|
||||
button.setPadding(0, button.getPaddingTop(), 0, button.getPaddingBottom());
|
||||
styleStepperButton(button);
|
||||
return button;
|
||||
}
|
||||
|
||||
static void styleStepperButton(MaterialButton button) {
|
||||
if (button == null) {
|
||||
return;
|
||||
}
|
||||
button.setGravity(android.view.Gravity.CENTER);
|
||||
button.setIncludeFontPadding(false);
|
||||
button.setSingleLine(true);
|
||||
button.setMinWidth(0);
|
||||
button.setMinimumWidth(0);
|
||||
button.setInsetTop(0);
|
||||
button.setInsetBottom(0);
|
||||
tryInvokeIntMethod(button, "setInsetLeft", 0);
|
||||
tryInvokeIntMethod(button, "setInsetRight", 0);
|
||||
button.setPadding(0, 0, 0, 0);
|
||||
button.setTextSize(20f);
|
||||
button.setAllCaps(false);
|
||||
}
|
||||
|
||||
static void styleCompactButtonText(MaterialButton button, float textSizeSp) {
|
||||
if (button == null) {
|
||||
return;
|
||||
}
|
||||
button.setAllCaps(false);
|
||||
button.setSingleLine(true);
|
||||
button.setIncludeFontPadding(false);
|
||||
button.setMinWidth(0);
|
||||
button.setMinimumWidth(0);
|
||||
tryInvokeIntMethod(button, "setInsetLeft", 0);
|
||||
tryInvokeIntMethod(button, "setInsetRight", 0);
|
||||
button.setPadding(0, button.getPaddingTop(), 0, button.getPaddingBottom());
|
||||
button.setTextSize(textSizeSp);
|
||||
}
|
||||
|
||||
private static void tryInvokeIntMethod(Object target, String methodName, int value) {
|
||||
if (target == null || methodName == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
java.lang.reflect.Method method = target.getClass().getMethod(methodName, int.class);
|
||||
method.invoke(target, value);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
static LinearLayout.LayoutParams stepperButtonParams(Context context) {
|
||||
return new LinearLayout.LayoutParams(dp(context, 40), ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
}
|
||||
@@ -139,6 +189,41 @@ final class ViewTreeSupport {
|
||||
return params;
|
||||
}
|
||||
|
||||
static void balanceHorizontalRadioGroup(Context context, RadioGroup group) {
|
||||
if (context == null || group == null || group.getOrientation() != RadioGroup.HORIZONTAL) {
|
||||
return;
|
||||
}
|
||||
int count = group.getChildCount();
|
||||
if (count == 0) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (!(group.getChildAt(i) instanceof RadioButton)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
RadioButton[] buttons = new RadioButton[count];
|
||||
for (int i = 0; i < count; i++) {
|
||||
buttons[i] = (RadioButton) group.getChildAt(i);
|
||||
}
|
||||
group.removeAllViews();
|
||||
for (int i = 0; i <= count; i++) {
|
||||
group.addView(new Space(context), new RadioGroup.LayoutParams(
|
||||
0,
|
||||
1,
|
||||
1f));
|
||||
if (i < count) {
|
||||
RadioButton button = buttons[i];
|
||||
button.setSingleLine(true);
|
||||
button.setMaxLines(1);
|
||||
button.setEllipsize(null);
|
||||
group.addView(button, new RadioGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static EditText numericInput(Context context, boolean signed, int maxLength) {
|
||||
EditText input = new EditText(context);
|
||||
input.setGravity(android.view.Gravity.CENTER);
|
||||
@@ -190,6 +275,8 @@ final class ViewTreeSupport {
|
||||
MaterialButton minus = outlinedStepperButton(context, "-");
|
||||
MaterialButton plus = outlinedStepperButton(context, "+");
|
||||
EditText input = numericInput(context, false, 1);
|
||||
input.setSaveEnabled(false);
|
||||
input.setSaveFromParentEnabled(false);
|
||||
input.setText(String.valueOf(current));
|
||||
row.addView(minus, stepperButtonParams(context));
|
||||
row.addView(input, stepperInputParams(context));
|
||||
@@ -241,8 +328,10 @@ final class ViewTreeSupport {
|
||||
|
||||
MaterialButton minus = outlinedStepperButton(context, "-");
|
||||
MaterialButton plus = outlinedStepperButton(context, "+");
|
||||
MaterialButton reset = showDefaultButton ? outlinedStepperButton(context, "D") : null;
|
||||
MaterialButton reset = showDefaultButton ? outlinedStepperButton(context, DEFAULT_SYMBOL) : null;
|
||||
EditText input = numericInput(context, signed, inputMaxLength);
|
||||
input.setSaveEnabled(false);
|
||||
input.setSaveFromParentEnabled(false);
|
||||
int current = clamp(prefs.getInt(key, defaultValue), min, max);
|
||||
int parseFallback = useCurrentAsParseFallback ? current : defaultValue;
|
||||
input.setText(String.valueOf(current));
|
||||
@@ -343,6 +432,9 @@ final class ViewTreeSupport {
|
||||
cardParams.topMargin = dp(context, 16);
|
||||
card.setLayoutParams(cardParams);
|
||||
card.setUseCompatPadding(true);
|
||||
card.setCardBackgroundColor(context.getColor(R.color.sbt_surface));
|
||||
card.setRadius(dp(context, 22));
|
||||
card.setCardElevation(dp(context, 2));
|
||||
card.setStrokeColor(context.getColor(R.color.sbt_card_outline));
|
||||
card.setStrokeWidth(dp(context, 1));
|
||||
LinearLayout inner = verticalLayout(context);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="@android:color/white" />
|
||||
<item android:color="?android:textColorPrimary" />
|
||||
<item android:state_checked="true" android:color="@color/sbt_on_surface" />
|
||||
<item android:color="@color/sbt_on_surface_variant" />
|
||||
</selector>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="12dp" />
|
||||
<corners android:radius="18dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FF03DAC5" />
|
||||
<solid android:color="#5503DAC5" />
|
||||
android:color="@color/sbt_accent_dark" />
|
||||
<solid android:color="@color/sbt_primary_container" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="315"
|
||||
android:centerColor="@color/sbt_primary"
|
||||
android:endColor="@color/sbt_accent_dark"
|
||||
android:startColor="@color/sbt_primary_dark"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:centerColor="@color/sbt_primary"
|
||||
android:endColor="@color/sbt_primary_dark"
|
||||
android:startColor="@color/sbt_primary_dark" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="@color/sbt_background_bottom"
|
||||
android:startColor="@color/sbt_background_top" />
|
||||
</shape>
|
||||
@@ -5,6 +5,7 @@
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/sbt_window_background"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<LinearLayout
|
||||
@@ -16,8 +17,10 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:background="@drawable/sbt_toolbar_background"
|
||||
android:elevation="0dp"
|
||||
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"
|
||||
app:navigationIconTint="@color/sbt_on_primary"
|
||||
app:titleTextColor="@android:color/white" />
|
||||
|
||||
<FrameLayout
|
||||
@@ -32,6 +35,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="@color/sbt_surface"
|
||||
android:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/drawer_header"
|
||||
app:itemBackground="@drawable/drawer_item_background"
|
||||
|
||||
@@ -195,6 +195,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:textColor="@color/sbt_accent_dark"
|
||||
android:text="@string/hidden_apps_add_exception"
|
||||
android:minHeight="40dp" />
|
||||
|
||||
|
||||
@@ -2,17 +2,26 @@
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="160dp"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:layout_height="172dp"
|
||||
android:background="@drawable/sbt_drawer_header_background"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="?attr/textAppearanceHeadline6"
|
||||
android:textColor="@android:color/white" />
|
||||
android:textColor="@color/sbt_on_primary"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/drawer_header_subtitle"
|
||||
android:textAppearance="?attr/textAppearanceCaption"
|
||||
android:textColor="@color/sbt_on_primary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -87,12 +87,14 @@
|
||||
android:id="@+id/battery_bar_position_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="36dp"
|
||||
android:text="@string/battery_bar_position_top" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/battery_bar_position_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="36dp"
|
||||
android:text="@string/battery_bar_position_bottom" />
|
||||
</RadioGroup>
|
||||
|
||||
@@ -113,7 +115,7 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/battery_bar_thickness_minus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="-" />
|
||||
|
||||
@@ -133,7 +135,7 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/battery_bar_thickness_plus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="+" />
|
||||
</LinearLayout>
|
||||
@@ -155,7 +157,7 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/battery_bar_edge_offset_minus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="-" />
|
||||
|
||||
@@ -175,7 +177,7 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/battery_bar_edge_offset_plus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="+" />
|
||||
</LinearLayout>
|
||||
@@ -197,18 +199,21 @@
|
||||
android:id="@+id/battery_bar_curved_geometry_off"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="36dp"
|
||||
android:text="@string/battery_bar_curved_geometry_off" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/battery_bar_curved_geometry_horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="36dp"
|
||||
android:text="@string/battery_bar_curved_geometry_horizontal" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/battery_bar_curved_geometry_length"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="36dp"
|
||||
android:text="@string/battery_bar_curved_geometry_length" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
@@ -411,8 +416,8 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/battery_bar_min_level_plus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingTop="0dp"
|
||||
@@ -422,8 +427,8 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/battery_bar_min_level_minus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingTop="0dp"
|
||||
@@ -496,8 +501,8 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/battery_bar_max_level_plus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingTop="0dp"
|
||||
@@ -507,8 +512,8 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/battery_bar_max_level_minus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingTop="0dp"
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/clock_custom_format_title"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
android:textAllCaps="true"
|
||||
android:letterSpacing="0.03"
|
||||
android:text="@string/clock_custom_format_statusbar_title"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
@@ -66,21 +66,38 @@
|
||||
android:minLines="2"
|
||||
android:scrollHorizontally="false"
|
||||
android:singleLine="false" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/clock_font_picker_button"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/clock_font_picker_button" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:strokeColor="@color/sbt_card_outline"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:letterSpacing="0.03"
|
||||
android:text="@string/clock_custom_format_drawer_clock_title"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/drawer_clock_custom_format_enabled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/drawer_clock_custom_format_enabled" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -104,12 +121,37 @@
|
||||
android:scrollHorizontally="false"
|
||||
android:singleLine="false" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:strokeColor="@color/sbt_card_outline"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:letterSpacing="0.03"
|
||||
android:text="@string/clock_custom_format_drawer_date_title"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/drawer_date_custom_format_enabled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/drawer_date_custom_format_enabled" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -133,6 +175,39 @@
|
||||
android:scrollHorizontally="false"
|
||||
android:singleLine="false" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardUseCompatPadding="true"
|
||||
app:strokeColor="@color/sbt_card_outline"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:letterSpacing="0.03"
|
||||
android:text="@string/clock_custom_format_tools_title"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="?attr/textAppearanceSubtitle1"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/clock_font_picker_button"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/clock_font_picker_button" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/clock_custom_format_help_toggle"
|
||||
@@ -140,7 +215,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/clock_custom_format_help_show"
|
||||
android:textAppearance="?attr/textAppearanceCaption" />
|
||||
android:textAppearance="?attr/textAppearanceBody1"
|
||||
android:textColor="@color/sbt_accent_dark" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/clock_custom_format_help_container"
|
||||
@@ -153,7 +229,7 @@
|
||||
android:id="@+id/clock_custom_format_help"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/clock_custom_format_help_common"
|
||||
android:textAppearance="?attr/textAppearanceCaption" />
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/debug_restart_systemui_button"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
@@ -305,6 +306,11 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="1"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="-10" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@@ -314,6 +320,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="1"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="-1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@@ -323,6 +334,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="1"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="+1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
@@ -332,11 +348,17 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="1"
|
||||
android:minWidth="0dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="+10" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_reset"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
|
||||
@@ -158,9 +158,9 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/clock_vertical_offset_minus_fast"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -169,10 +169,10 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/clock_vertical_offset_minus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -194,9 +194,9 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/clock_vertical_offset_plus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -205,10 +205,10 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/clock_vertical_offset_plus_fast"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -217,14 +217,14 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/clock_vertical_offset_reset"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="0" />
|
||||
android:text="↺" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -364,9 +364,9 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/chip_vertical_offset_minus_fast"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -375,10 +375,10 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/chip_vertical_offset_minus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -400,9 +400,9 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/chip_vertical_offset_plus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -411,10 +411,10 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/chip_vertical_offset_plus_fast"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -423,14 +423,14 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/chip_vertical_offset_reset"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="0" />
|
||||
android:text="↺" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -585,9 +585,9 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/notif_vertical_offset_minus_fast"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -596,10 +596,10 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/notif_vertical_offset_minus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -621,9 +621,9 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/notif_vertical_offset_plus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -632,10 +632,10 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/notif_vertical_offset_plus_fast"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -644,14 +644,14 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/notif_vertical_offset_reset"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="0" />
|
||||
android:text="↺" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -806,9 +806,9 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/status_vertical_offset_minus_fast"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -817,10 +817,10 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/status_vertical_offset_minus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -842,9 +842,9 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/status_vertical_offset_plus"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -853,10 +853,10 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/status_vertical_offset_plus_fast"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
@@ -865,14 +865,14 @@
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/status_vertical_offset_reset"
|
||||
style="?attr/materialButtonOutlinedStyle"
|
||||
android:layout_width="40dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:minWidth="40dp"
|
||||
android:minWidth="36dp"
|
||||
android:minHeight="40dp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="0" />
|
||||
android:text="↺" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
android:insetBottom="0dp"
|
||||
android:paddingStart="6dp"
|
||||
android:paddingEnd="6dp"
|
||||
android:textColor="@color/sbt_danger"
|
||||
android:text="@string/hidden_apps_delete_exception" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="sbt_primary">#FF3D2415</color>
|
||||
<color name="sbt_primary_dark">#FF170B05</color>
|
||||
<color name="sbt_primary_container">#FF301A0D</color>
|
||||
<color name="sbt_accent">#FFFF8A1C</color>
|
||||
<color name="sbt_accent_dark">#FFFFA03C</color>
|
||||
<color name="sbt_background_top">#FF110B07</color>
|
||||
<color name="sbt_background_bottom">#FF1B0F08</color>
|
||||
<color name="sbt_surface">#FF20140D</color>
|
||||
<color name="sbt_surface_variant">#FF302012</color>
|
||||
<color name="sbt_on_primary">#FFFFFFFF</color>
|
||||
<color name="sbt_on_surface">#FFEAF0F3</color>
|
||||
<color name="sbt_on_surface_variant">#FFE3D3B6</color>
|
||||
<color name="sbt_card_outline">#30FFFFFF</color>
|
||||
<color name="sbt_panel_outline">#66FFFFFF</color>
|
||||
<color name="sbt_danger">#FFB71C1C</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.MoreNotis" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<style name="Theme.StatusBarTweak" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<item name="colorPrimary">@color/sbt_primary</item>
|
||||
<item name="colorPrimaryVariant">@color/sbt_primary_dark</item>
|
||||
<item name="colorOnPrimary">@color/sbt_on_primary</item>
|
||||
<item name="colorSecondary">@color/sbt_accent</item>
|
||||
<item name="colorSecondaryVariant">@color/sbt_accent_dark</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorSurface">@color/sbt_surface</item>
|
||||
<item name="colorOnSurface">@color/sbt_on_surface</item>
|
||||
<item name="android:colorAccent">@color/sbt_accent</item>
|
||||
<item name="android:fontFamily">sans-serif</item>
|
||||
<item name="android:windowBackground">@drawable/sbt_window_background</item>
|
||||
<item name="android:navigationBarColor">@color/sbt_primary_dark</item>
|
||||
<item name="android:statusBarColor">@color/sbt_primary_dark</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.StatusBarTweak.Card</item>
|
||||
<item name="materialButtonOutlinedStyle">@style/Widget.StatusBarTweak.OutlinedButton</item>
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.StatusBarTweak.MaterialAlertDialog</item>
|
||||
<item name="sliderStyle">@style/Widget.StatusBarTweak.Slider</item>
|
||||
<item name="switchStyle">@style/Widget.StatusBarTweak.Switch</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,14 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="sbt_primary">#FF3D2415</color>
|
||||
<color name="sbt_primary_dark">#FF241007</color>
|
||||
<color name="sbt_primary_container">#FFFFE3C2</color>
|
||||
<color name="sbt_accent">#FFFF8A1C</color>
|
||||
<color name="sbt_accent_dark">#FFD46500</color>
|
||||
<color name="sbt_background_top">#FFFFF4E8</color>
|
||||
<color name="sbt_background_bottom">#FFF5E5D2</color>
|
||||
<color name="sbt_surface">#FFFFFFFF</color>
|
||||
<color name="sbt_surface_variant">#FFFFF1E0</color>
|
||||
<color name="sbt_on_primary">#FFFFFFFF</color>
|
||||
<color name="sbt_on_surface">#FF111820</color>
|
||||
<color name="sbt_on_surface_variant">#FF62553F</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="sbt_card_outline">#33000000</color>
|
||||
<color name="sbt_card_outline">#24000000</color>
|
||||
<color name="sbt_panel_outline">#4D000000</color>
|
||||
<color name="sbt_hidden_item_active_bg">#1AE65100</color>
|
||||
<color name="sbt_hidden_cross">#CCB00020</color>
|
||||
<color name="sbt_danger">#FFB71C1C</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<resources>
|
||||
<string name="app_name">StatusBarTweak</string>
|
||||
<string name="module_description">Status bar and lockscreen layout tweaks for Samsung SystemUI.</string>
|
||||
<string name="drawer_header_subtitle">Statusbar layout control</string>
|
||||
<string name="nav_open">Open navigation</string>
|
||||
<string name="nav_close">Close navigation</string>
|
||||
<string name="nav_icons_debug">Debugging</string>
|
||||
<string name="nav_system_icons">Hide status icons</string>
|
||||
<string name="nav_layout_hide_notification_icons">    Hide notification icons</string>
|
||||
<string name="nav_layout_hide_status_icons">    Hide status icons</string>
|
||||
<string name="nav_clock">Clock</string>
|
||||
<string name="nav_clock">Clock text</string>
|
||||
<string name="nav_layout">Layout</string>
|
||||
<string name="nav_layout_unlocked">    Unlocked</string>
|
||||
<string name="nav_layout_lockscreen">    Lockscreen</string>
|
||||
@@ -149,12 +150,9 @@
|
||||
<string name="battery_bar_curved_geometry_length">On, actual curve length</string>
|
||||
<string name="battery_bar_scenario_overrides_title">Scenario overrides</string>
|
||||
<string name="battery_bar_scenario_overrides_hint">Optional geometry overrides. Disabled scenarios use the default geometry above.</string>
|
||||
<string name="battery_bar_unlocked_portrait_override">Unlocked portrait</string>
|
||||
<string name="battery_bar_unlocked_landscape_override">Unlocked landscape</string>
|
||||
<string name="battery_bar_transparent_portrait_override">Transparent statusbar portrait</string>
|
||||
<string name="battery_bar_transparent_landscape_override">Transparent statusbar landscape</string>
|
||||
<string name="battery_bar_fullscreen_portrait_override">Fullscreen portrait</string>
|
||||
<string name="battery_bar_fullscreen_landscape_override">Fullscreen landscape</string>
|
||||
<string name="battery_bar_scenario_group_unlocked">Unlocked</string>
|
||||
<string name="battery_bar_scenario_group_transparent">Transparent statusbar</string>
|
||||
<string name="battery_bar_scenario_group_fullscreen">Fullscreen</string>
|
||||
<string name="battery_bar_lockscreen_override">Lockscreen</string>
|
||||
<string name="battery_bar_edit_override">Edit</string>
|
||||
<string name="battery_bar_override_dialog_title">Edit %1$s geometry</string>
|
||||
@@ -184,7 +182,7 @@
|
||||
<string name="battery_bar_threshold_duplicate">A threshold at that percentage already exists.</string>
|
||||
<string name="battery_bar_threshold_reordered">That threshold moved to a new position in the list.</string>
|
||||
<string name="battery_bar_threshold_charge_note">Leave the field empty and press OK for \"Same as discharge\", or use the button below for \"Same as default\".</string>
|
||||
<string name="clock_title">Clock</string>
|
||||
<string name="clock_title">Clock text</string>
|
||||
<string name="layout_home_title">Layout</string>
|
||||
<string name="layout_title">Unlocked</string>
|
||||
<string name="layout_master_toggle_title">Master toggle</string>
|
||||
@@ -236,16 +234,20 @@
|
||||
<string name="clock_middle_side_left">Left side</string>
|
||||
<string name="clock_middle_side_right">Right side</string>
|
||||
<string name="clock_custom_format_title">Custom format</string>
|
||||
<string name="clock_custom_format_enabled">Use custom date/time pattern</string>
|
||||
<string name="drawer_clock_custom_format_enabled">Use custom drawer clock pattern</string>
|
||||
<string name="drawer_date_custom_format_enabled">Use custom drawer date pattern</string>
|
||||
<string name="clock_custom_format_statusbar_title">Statusbar clock</string>
|
||||
<string name="clock_custom_format_drawer_clock_title">Drawer clock</string>
|
||||
<string name="clock_custom_format_drawer_date_title">Drawer date</string>
|
||||
<string name="clock_custom_format_tools_title">Tools and instructions</string>
|
||||
<string name="clock_custom_format_enabled">Enable custom date/time pattern</string>
|
||||
<string name="drawer_clock_custom_format_enabled">Enable custom date/time pattern</string>
|
||||
<string name="drawer_date_custom_format_enabled">Enable custom date/time pattern</string>
|
||||
<string name="clock_custom_format_hint">Examples: HH:mm, EEE d MMM HH:mm:ss, {color(#batterybar 1.2 * ; invRGB 0.5 *RGB) big @sans-serif-condensed}HH:mm</string>
|
||||
<string name="clock_custom_format_help_common">Date/time patterns:\n\u2022 Uses Java SimpleDateFormat-style pattern letters\n\u2022 Common symbols: yyyy yy MMMM MMM MM EEEE EEE dd d HH hh mm ss a\n\nTags:\n\u2022 Supported tags: <i>, <u>, <small>, <big>, <font color=\'...\'>, <font face=\'...\'>\n\u2022 <b> is not supported\n\u2022 Custom font tags: <sans>, <serif>, <mono>, <condensed>\n\u2022 {/font} closes any open <font ...> tag\n\u2022 Opening a new colour or font face automatically closes the previous one</string>
|
||||
<string name="clock_custom_format_help_styling">Shorthand blocks:\n\u2022 {#FA0 big @sans-serif-condensed} is shorthand for opening multiple tags in order\n\u2022 {#FA0} is shorthand for {color(#FA0)}\n\u2022 In shorthand: / closes a tag, color(...) sets font colour, @ sets font face\n\u2022 Each whitespace-separated token inside {} becomes its own tag, except color(...) which may contain spaces\n\nLine breaks:\n\u2022 Use \\n, {\\n} or {\\n15}; the number is the line-height delta in px\n\u2022 Omit the number to use the default row spacing\n\u2022 { /\\n } style line breaks are written without spaces: {/\\n} or {/\\n15}\n\u2022 Normal line breaks propagate open tags onto the next row\n\u2022 A / line break ends all currently open tags before the next row starts\n\nPipes and grouping:\n\u2022 Maximum two pipes per row; more than two is a syntax error for that row only\n\u2022 Pipes inside single quotes or {} do not split the row\n\u2022 One pipe splits into left and right segments\n\u2022 Two pipes remove the middle section, then split using the outer pipes\n\u2022 Tags are logically continued across pipe splits, even if the middle section is ignored\n\u2022 Rows without pipes are independent; rows with pipes share one common pipe group\n\u2022 A syntax-error row becomes the text Syntax error, with no whole-clock fallback\n\nColours:\n\u2022 Supported operands: #RGB, #ARGB, #RRGGBB, #AARRGGBB, #batterybar, [R,G,B], [A,R,G,B], and numbers\n\u2022 Colour expressions use reverse Polish notation: operands first, operator last\n\u2022 Use ; to separate bright/dark variants; the dark side starts with the raw result from the bright side on the stack\n\u2022 Operators: + - * / ^ inv min max sqrt clip dup\n\u2022 Operators can be channel-filtered, for example +A, *RGB, invRGB, maxRGB, clipA\n\u2022 Final values are clipped to 0..255; a final number becomes opaque grayscale</string>
|
||||
<string name="clock_custom_format_help_examples">Examples:\n\u2022 <small>EEE d MMM</small> HH:mm\n\u2022 HH<small>:mm</small>\n\u2022 <font color=\'#FA0\'>ss</font>\n\u2022 {color(#FA0 ; invRGB 0.8 *RGB)}ss\n\u2022 {color(#batterybar 1.2 * ; invRGB 0.5 *RGB) big u @sans-serif-condensed}HH:mm\n\u2022 {color([255, 255, 170, 0] ; invRGB)}HH:mm\n\u2022 HH:mm{\\n12 small}EEE d MMM\n\u2022 HH|mm aligns the pipe position across every piped row\n\u2022 left||right removes the middle section before split alignment\n\u2022 {/font}{/\\n big}HH:mm starts a new row without carrying the previous font tags forward</string>
|
||||
<string name="clock_font_picker_button">Browse font families</string>
|
||||
<string name="clock_custom_format_help_show">Show pattern instructions</string>
|
||||
<string name="clock_custom_format_help_hide">Hide pattern instructions</string>
|
||||
<string name="clock_custom_format_help_show">▾ Show pattern instructions</string>
|
||||
<string name="clock_custom_format_help_hide">▴ Hide pattern instructions</string>
|
||||
<string name="clock_font_picker_title">Font families</string>
|
||||
<string name="clock_font_picker_hint">Search font family</string>
|
||||
<string name="clock_font_picker_copied">Copied: %1$s</string>
|
||||
|
||||
@@ -1,26 +1,82 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.MoreNotis" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<style name="Theme.StatusBarTweak" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<item name="colorPrimary">@color/sbt_primary</item>
|
||||
<item name="colorPrimaryVariant">@color/sbt_primary_dark</item>
|
||||
<item name="colorOnPrimary">@color/sbt_on_primary</item>
|
||||
<item name="colorSecondary">@color/sbt_accent</item>
|
||||
<item name="colorSecondaryVariant">@color/sbt_accent_dark</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorSurface">@color/sbt_surface</item>
|
||||
<item name="colorOnSurface">@color/sbt_on_surface</item>
|
||||
<item name="android:colorAccent">@color/sbt_accent</item>
|
||||
<item name="android:fontFamily">sans-serif</item>
|
||||
<item name="android:windowBackground">@drawable/sbt_window_background</item>
|
||||
<item name="android:navigationBarColor">@color/sbt_primary_dark</item>
|
||||
<item name="android:statusBarColor">@color/sbt_primary_dark</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.StatusBarTweak.Card</item>
|
||||
<item name="materialButtonOutlinedStyle">@style/Widget.StatusBarTweak.OutlinedButton</item>
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.StatusBarTweak.MaterialAlertDialog</item>
|
||||
<item name="sliderStyle">@style/Widget.StatusBarTweak.Slider</item>
|
||||
<item name="switchStyle">@style/Widget.StatusBarTweak.Switch</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.MoreNotis.NoActionBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<style name="Theme.StatusBarTweak.NoActionBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/sbt_primary</item>
|
||||
<item name="colorPrimaryVariant">@color/sbt_primary_dark</item>
|
||||
<item name="colorOnPrimary">@color/sbt_on_primary</item>
|
||||
<item name="colorSecondary">@color/sbt_accent</item>
|
||||
<item name="colorSecondaryVariant">@color/sbt_accent_dark</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||
<item name="colorSurface">@color/sbt_surface</item>
|
||||
<item name="colorOnSurface">@color/sbt_on_surface</item>
|
||||
<item name="android:colorAccent">@color/sbt_accent</item>
|
||||
<item name="android:fontFamily">sans-serif</item>
|
||||
<item name="android:windowBackground">@drawable/sbt_window_background</item>
|
||||
<item name="android:navigationBarColor">@color/sbt_primary_dark</item>
|
||||
<item name="android:statusBarColor">@color/sbt_primary_dark</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.StatusBarTweak.Card</item>
|
||||
<item name="materialButtonOutlinedStyle">@style/Widget.StatusBarTweak.OutlinedButton</item>
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.StatusBarTweak.MaterialAlertDialog</item>
|
||||
<item name="sliderStyle">@style/Widget.StatusBarTweak.Slider</item>
|
||||
<item name="switchStyle">@style/Widget.StatusBarTweak.Switch</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.StatusBarTweak.Card" parent="Widget.MaterialComponents.CardView">
|
||||
<item name="cardBackgroundColor">@color/sbt_surface</item>
|
||||
<item name="cardCornerRadius">22dp</item>
|
||||
<item name="cardElevation">2dp</item>
|
||||
<item name="strokeColor">@color/sbt_card_outline</item>
|
||||
<item name="strokeWidth">1dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.StatusBarTweak.OutlinedButton" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||
<item name="cornerRadius">14dp</item>
|
||||
<item name="strokeColor">@color/sbt_accent_dark</item>
|
||||
<item name="android:textColor">@color/sbt_on_surface</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.StatusBarTweak.DialogButton" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
|
||||
<item name="android:textColor">@color/sbt_accent_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.StatusBarTweak.Slider" parent="Widget.MaterialComponents.Slider">
|
||||
<item name="thumbColor">@color/sbt_accent</item>
|
||||
<item name="haloColor">@color/sbt_primary_container</item>
|
||||
<item name="trackColorActive">@color/sbt_accent</item>
|
||||
<item name="trackColorInactive">@color/sbt_panel_outline</item>
|
||||
<item name="tickColorActive">@color/sbt_primary_dark</item>
|
||||
<item name="tickColorInactive">@color/sbt_on_surface_variant</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeOverlay.StatusBarTweak.MaterialAlertDialog" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
|
||||
<item name="buttonBarPositiveButtonStyle">@style/Widget.StatusBarTweak.DialogButton</item>
|
||||
<item name="buttonBarNegativeButtonStyle">@style/Widget.StatusBarTweak.DialogButton</item>
|
||||
<item name="buttonBarNeutralButtonStyle">@style/Widget.StatusBarTweak.DialogButton</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.StatusBarTweak.Switch" parent="Widget.MaterialComponents.CompoundButton.Switch">
|
||||
<item name="useMaterialThemeColors">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user