Skip to content

Material3 UI redesign — main screen, settings sub-screens, log viewer#97

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/update-app-ui-material-design
Draft

Material3 UI redesign — main screen, settings sub-screens, log viewer#97
Copilot wants to merge 2 commits into
masterfrom
copilot/update-app-ui-material-design

Conversation

Copy link
Copy Markdown

Copilot AI commented May 19, 2026

Summary

Full Material3 UI redesign of the app as requested.

Changes

Main Activity (activity_main.xml + MainActivity.java)

  • Replaced the plain linear layout + overflow menu with a card-based hero design
  • Hero card (colorSecondaryContainer): app icon (80dp), service status text, large MaterialSwitch with label
  • Info card (colorSurfaceVariant): the existing info text, cleanly framed
  • Four Material3 action buttons replacing menu items:
    • Settings (tonal) + Doze Tunables (tonal) — primary row
    • More Info (outlined) + Battery Stats (outlined) — secondary row
  • btnEnableDozeUnsupported — ghost text button, hidden by default, shown only on unsupported devices
  • Simplified overflow menu retains only the "Enable Doze on unsupported device" rare action

Settings (prefs.xml + SettingsActivity.java)

  • Reorganised the flat preference list into four navigable sub-screens:
    • General — execution mode, charging behaviour, lockscreen, notifications, whitelisting
    • Doze Enhancements — WiFi/data/airplane/BT/GPS/sensors/biometrics/battery-saver/blocklists
    • Scheduling — entry delay, custom doze periods
    • Advanced — stats, logcat, reset, debug logs, Tasker broadcasts, About
  • SettingsActivity implements OnPreferenceStartScreenCallback for fragment-based sub-screen navigation with back-stack and toolbar title updates
  • SettingsFragment has a newInstance(rootKey) factory + uses setPreferencesFromResource with rootKey
  • All findPreference() calls wrapped with null checks — safe on both root screen and sub-screens
  • Added setPreferenceState(pref, enabled, summaryResId) helper to eliminate duplication in toggleRootFeatures
  • Fixed a pre-existing bug: turnOffBiometricsInDoze was incorrectly receiving the battery-saver summary string on enable

Log Activity (activity_log.xml)

  • Wrapped EditText in a MaterialCardView (colorSurfaceVariant, no elevation) for a cleaner look
  • Applied monospace font and removed the default EditText background

String resources (strings.xml)

  • Added labels for the four new action buttons and sub-screen section titles/summaries

Copilot AI and others added 2 commits May 19, 2026 13:43
…g viewer

Agent-Logs-Url: https://github.com/Akylas/EnforceDoze/sessions/f2a3bd0c-9170-4031-8c58-afc202f7855a

Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
…ferenceState helper

Agent-Logs-Url: https://github.com/Akylas/EnforceDoze/sessions/f2a3bd0c-9170-4031-8c58-afc202f7855a

Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants