Skip to content
This repository was archived by the owner on Jun 14, 2022. It is now read-only.

Added auto theme selection for Android 10 devices #418

Merged
merged 2 commits into from
Mar 12, 2021

Conversation

Ullas-Aithal
Copy link
Contributor

This is for #394

Added theme mode option in settings. This option will be hidden in devices below Android 10 and set to "Auto" by default for Android 10 devices. Two options will be available: "Auto" and "Manual"

If Auto is selected: Theme selection will be disabled. If the device theme is light, light theme will be applied or else dark theme will be applied. This happens automactically.
While on Manual: Allows the old option to select between light, dark and black themes

I tested this on my device OnePlus 7 Pro (Android 10), Pixel 3XL (Android 10) and Pixel 3 (Android 9)

@Ullas-Aithal
Copy link
Contributor Author

Ullas-Aithal commented Nov 1, 2019

@flocke, using the same approach as my last pull request, I'm recreating both MainActivity and SettingsActivity if Theme Mode option is changed. I need to recreate SettingsActivity to refresh theme selection option if it's grayed out or vice-versa

Let me know if you need me to do any changes.

@flocke flocke self-assigned this Nov 1, 2019
@flocke flocke added this to the v0.7.0 milestone Nov 1, 2019
@viggy96
Copy link

viggy96 commented Nov 13, 2019

LineageOS 16 which is based on Android 9 also has a global dark theme setting. Will this feature be exposed to these devices?

@flocke
Copy link
Member

flocke commented Nov 13, 2019

If they implemented it by backporting the changes from Android 10 then yes, otherwise no.

@flocke
Copy link
Member

flocke commented Feb 5, 2020

I think I will have to close this PR since I plan on reworking the entire theme stuff after the final release of version 0.7.0, which will change a lot. But thank you for your contribution (and your other PRs)!

@flocke flocke closed this Feb 5, 2020
@flocke flocke reopened this Mar 12, 2021
@flocke
Copy link
Member

flocke commented Mar 12, 2021

I'm revisiting this PR since the theme rework will have to wait, I just don't have the time to work on it right now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants