Flym icon indicating copy to clipboard operation
Flym copied to clipboard

[feature request] theme change based on time

Open infinitytec opened this issue 5 years ago • 13 comments

Dark themes are great, but light themes can be easier to read during the day. It would be nice to be able to have it automatically change.

infinitytec avatar May 08 '19 18:05 infinitytec

I think having themes depend on time, battery status or whatever should be left to the OS, and then apps should follow the system theme by default, as suggested here:

https://developer.android.com/guide/topics/ui/look-and-feel/darktheme

(Stock Android doesn't actually support setting the theme based on time right now; I'm just saying that theme settings should be system-wide rather than per-app, in my book. So my feature request for Flym would be following the system theme, and then time-based themes would be a feature request against Android.)

weiss avatar Jan 07 '20 14:01 weiss

Any working example for this?

ildar avatar Jan 08 '20 06:01 ildar

Any working example for this?

The FOSDEM Companion app does it this way, for example.

weiss avatar Jan 08 '20 07:01 weiss

Thanks. Are there any video how it works? And which is miniman Android version for this? Thanks in advance.

ildar avatar Jan 08 '20 08:01 ildar

Are there any video how it works?

How what exactly works? There's simply a knob to enable dark mode somewhere in the system settings. (Plus, on my Pixel phone, I can configure my phone to auto-enable dark mode once the battery status drops below some threshold, but that might not be offered by all vendors. Other vendors might offer other magic.)

And which is miniman Android version for this?

The mechanism to have apps stick to the system theme requires Android 10. For Android 9 and older, the Android docs I linked above suggest to auto-enable the dark theme by default whenever the battery saver mode is activated.

weiss avatar Jan 08 '20 10:01 weiss

Nice, thanks a lot! Though I think that Fred should first grow up the targetSdk before anything like that.

ildar avatar Jan 08 '20 10:01 ildar

Yeah, my main point was arguing against the original suggestion of building theme-related magic into the app, as I think that's not how things should work in the future (sorry @infinitytec) ...

weiss avatar Jan 08 '20 10:01 weiss

Sounds good except: what about the other of 95% users using older Android version?

ildar avatar Jan 08 '20 11:01 ildar

I think Android 9's market share is close to 50% already, so it's probably a matter of a year or so until every other user will run Android 10. But yes, if time-based themes is a feature many users desperately need right now then ignore me.

weiss avatar Jan 08 '20 12:01 weiss

Yeah, my main point was arguing against the original suggestion of building theme-related magic into the app, as I think that's not how things should work in the future (sorry @infinitytec) ...

I'm on a Galaxy S8 running Samsung's release of Android 9. There is a dark theme built into the system which can be timed. A few select applications are able to sense this (ex. Play Store). It may be possible to implement this with two options, based on Android feature availability. One could be just timing and the other matches the system setting.

infinitytec avatar Jan 08 '20 14:01 infinitytec

So, there's no expectations of this happening in a short term, right?

moshpirit avatar Aug 12 '20 23:08 moshpirit

It is actually quite easy to apply system based theme. I have done it on several other apps I have worked on. Best way to support all device is to change theme based on system settings if OS supports otherwise stick with whatever default you like to be set. It has to be implemented with DayNight api.

Its been a while I have messed around with Flym (probably close to 6 years actually). I will see if I can implement it when I get some free time.

On Wed, Aug 12, 2020, 7:17 PM moshpirit [email protected] wrote:

So, there's no expectations of this happening in a short term, right?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FredJul/Flym/issues/477#issuecomment-673155466, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI3ZHXH5ITESUIBXXWL3C3SAMPG3ANCNFSM4HLUDYCQ .

SlackingVeteran avatar Aug 15 '20 15:08 SlackingVeteran

That would be amazing!!

moshpirit avatar Aug 20 '20 09:08 moshpirit