Please use GitHub reactions 馃憤 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!
Is your feature request related to a problem? Please describe.
I'm running an Android 9 device that does not have a system-wide dark theme. I have the dark theme set in the app, but apparently this setting does not affect widgets, since they remain light.
Describe the solution you'd like
I'd like a way to force the widgets into dark theme on older versions of Android, where system-wide dark theme setting is unavailable. The simplest way for now would probably be to use the app theme for widgets as well.
Describe alternatives you've considered
Widget theme can either (1) follow the app theme, or (2) widgets can have a dedicated setting, or (3) both (widgets following app theme by default, but with a manual override available). Solution 1 seems to be the simplest and can be later extended into 2 or 3.
I'm not sure whether anyone actually wants separate themes for the app and the widgets, I actually don't, and I can see how excessive settings can be off-putting. Looking for input on this one 馃檪
Hey @D-side,
let me try to answer your questions and explain the decisions we have made:
I have the dark theme set in the app, but apparently this setting does not affect widgets, since they remain light.
This is correct and by intention.
I'm not sure whether anyone actually wants separate themes for the app and the widgets, I actually don't, and I can see how excessive settings can be off-putting. Looking for input on this one :slightly_smiling_face:
The dark mode of the app does not affect the appearance of the widgets because the context is different. While the app is something one starts intentionally and runs in its own context, all widgets from (provided by any app) run always in the context of the launcher. To provide a homogeneous interface in your launcher, Google implemented the global Android setting in Android 10 to affect everything in this context at once - the app drawer, the status bar and the widgets.
The other way around will make more sense: Why should anyone actually use the same theme of one particular widget as in the app? This means a wild range of various styled widgets which you are looking at on your homescreen or alternatively set your theme over and over again in each and every app (or even worse: in each widget instance). I am sure you agree that this is ridiculous :smile: As a dark mode fan, you want to set this once and it should affect everything, huh? So the actual issue is, that
I'm running an Android 9 device that does not have a system-wide dark theme.
According to our Play Store statistics of April 2021, 79% of our (Play Store) users used Android 10 or higher and therefore the global setting is already present for them. Further 24%20% used Android 7 - Android 9 and can utilize tweaks (or other workarounds if they prefer to stay on old and partially even by Google abandoned Android versions without security fixes instead of using a modern Custom ROM or other alternatives).

Implementing and maintaining a separate dark mode beside the global Android setting is not justified in any way, especially with a look at those numbers of a decreasing percentage and also absolute number of Android 9 users. Also multiple benefits and advantages wouldn't be available when ignoring the global Android setting. (Just naming one example Android will switch the complete system UI to a dark mode when the battery is low to safe battery).
I hope i was able to elaborate a bit more why we decided to go the way we eventually did (as well as the Notes and News app) and hope you understand our reasons.
Use a workaround, we have no plans to change the current behavior.
Thanks for the pointers! 馃憤
Failing to use the workarounds (none I found seem to work on my stock firmware, and I don't want to flash anything else), I found the "Night mode" setting in developer settings (I have a OnePlus 3T). Strangely, it seems to be a completely different to the "Night mode" in system settings, which just seems to tint the screen yellow (blue light reduction).
But the flag in developer settings did the job, the widgets are now dark. So I'm good for now.
Curiously, it had no effect on GMail, which is also supposed to switch automatically. 馃 Play Market, on the other hand, includes a manual switch. GMail does not. It's a mess 馃槙
I'm not informed enough on what it would take to implement dark mode where it's unsupported. If it requires an additional complete set of styles for lack of such styles in the system, then yeah, I can see how that is too laborious for the result.
I would still argue that, with Android being the biggest mobile platform in the world today, even smaller percentages amount to massive absolute numbers, and decisions like this constribute to rapid obsolescence of otherwise capable devices. But I understand that having a dark stylesheet in the project would come with ongoing maintenance duty which only benefits the decreasing minority of users.
Overall "works for me" outweighs my disagreement with this decision, so I'm happy that I filed this issue 馃榿
Thank you for understanding and happy to hear that you found a way that makes it work for you.
even smaller percentages amount to massive absolute numbers
True, but keep in mind that we are an open source project with volunteer contributors (we aren't related to the Nextcloud GmbH). Free time is limited and since we have no huge paid development team, we need to focus our available time to some topics. Maintaining this edge case (and various others which are not important to you, but to other small groups of our users) will only cause a mess in the code and preventing us from implementing actual features like attachment support, search, and so on.
decisions like this constribute to rapid obsolescence of otherwise capable devices.
Don't you dare 馃が馃榿! The app works flawlessly down to Android 5.0 (and 8 weeks ago even Android 4.4). This limitation is caused by the Single Sign-On mechanism and therefore ultimately by the Nextcloud GmbH. Certain features only being available on more recent Android versions is definitely no "contribution to rapid obsolescence". Guess you are one of those Internet Explorer 6 users complaining about web developers, huh? 馃榿
Jokes aside, the lack of a dark mode setting per widget instance is definitely nothing that makes the app useless on older devices. We are doing everything we can to support old shit, but as i said, sometimes we have to make those kind of decisions to move forward. I recommend you to have a look for smartphones with long update support and / or custom ROMs if you are interested in sustainability. Alternatively we always are looking for contributors, so if you want to implement this and commit to maintain this stuff for the next few years, you are welcome of course! :slightly_smiling_face:
袩褉懈胁械褌, 写褉褍谐!
Regarding custom ROMs: I'm currently using my OnePlus 3 (no T) and didn't find any better one than Resurrection Remix or, what I'm using currently: Colt OS. Not only I'm on Android 10, it also runs better than the stock ROM and has the most awesome boot animation (I know, killer feature!).
In case you decide to go for a custom ROM, I'd totally recommend one of these. OnePlus devices are relatively easy to flash.
Sorry that we can't make every dream come true, as a total fan of dark modes I totally understand your point, but as you and @stefan-niedermann already stated, the work wouldn't be worth for this. I'm glad we could at least convince the master of UI (-> Stefan) to make the dark mode for the app, so I can't complain.
Stay safe buddy, feel free to report any other issues you have with our app!
Certain features only being available on more recent Android versions is definitely no "contribution to rapid obsolescence".
@stefan-niedermann this one case is by no means a deal-breaker, but little by little these things add up. I'm mildly upset with how Google handles operates in this regard and I'm expressing my advice against going in this direction 馃槃 Great to hear it's still a priority for you!
Guess you are one of those Internet Explorer 6 users complaining about web developers, huh? 馃榿
My limit is an EOL Firefox on an aftermarket Android 5 (Asus TF101) that is somehow still alive and is used as a smart home panel. IE6 is too much even for me 馃ぃ
Yeah, I admit that my reasoning for this is weak, hence why getting it to work for me is enough to ignore it. Otherwise I might have actually tried my hand at implementing this. To clarify: I was thinking more in the realm of "one switch for all widgets" rather than "one switch per widget instance". It's simpler to implement and from a user perspective having widgets of both light and dark variant next to each other wouldn't be easy on the eyes at all, so there's little point in facilitating this anyway 馃憖
I understand it's a question of priorities. Something like this would just stay at the bottom of the backlog for eternity or would be closed as stale anyway. So closing this now quite likely saves more time than it wastes.
Regarding custom ROMs
小锌邪褋懈斜芯, @desperateCoder!
I've been avoiding custom ROMs on that particular device because I rely on apps there that use SafetyNet integrity checks, and there's a decent chance of breaking those when going for aftermarket firmwares. I will probably do that anyway once I have a backup device for these... But there's been enough off-topic in this thread, as nice as it has been 馃檪
Most helpful comment
袩褉懈胁械褌, 写褉褍谐!
Regarding custom ROMs: I'm currently using my OnePlus 3 (no T) and didn't find any better one than Resurrection Remix or, what I'm using currently: Colt OS. Not only I'm on Android 10, it also runs better than the stock ROM and has the most awesome boot animation (I know, killer feature!).
In case you decide to go for a custom ROM, I'd totally recommend one of these. OnePlus devices are relatively easy to flash.
Sorry that we can't make every dream come true, as a total fan of dark modes I totally understand your point, but as you and @stefan-niedermann already stated, the work wouldn't be worth for this. I'm glad we could at least convince the master of UI (-> Stefan) to make the dark mode for the app, so I can't complain.
Stay safe buddy, feel free to report any other issues you have with our app!