Android: dark theme

Created on 16 Feb 2018  路  34Comments  路  Source: nextcloud/android

The issue template seem overkill for a feature request of a dark theme. I do not see a GitHub issue for this request, but there was one in the forums.

accessibility approved design enhancement Theming

Most helpful comment

I've made a start on this feature using daynight mode to switch between a "light" and "dark" theme. Screenshots:
screenshot_1543928809

screenshot_1543928779

screenshot_1543928783

Could someone with more knowledge of the code base tell me where this text colour is set:
screenshot_1543928720

All 34 comments

@b-harper thanks for the report and yes this would be an enhancement. However I can't find a reference to it in the link you posted.

I linked to the wrong post within that thread. You replied to nullnvoid's request in this post:

nullnvoid : Also is there any possibility of a dark theme?

That would be a new feature and yes that should be technically possible even though I am not sure how much work this would be at this time since the code base isn鈥檛 perfect for multi theme support. We might also rather look into the new feature of Android day/night theme :smiley: But again this would then also need some input from @jan and the design team on how the dark theme should look like.

@mario @tobiasKaminsky @nextcloud/designers What do you think?

As mentioned yes this would be possible for newer Android versions since I'd then vote to just support a dark theme via the day/night theming capabilities of actual Android versions to not pollute the code base with switches.

Do you know how this behaves with custom theming? E.g. if I have light blue or a very dark blue, how will both behave on a night/dark mode?
As for now I think the priorities are somewhere else, but if someone wants to pick this up, first discuss it with @nextcloud/designers and then feel free to implement it.

to not pollute the code base with switches.

I fear that at least one switch is needed, which enables/disables theming on day/night.

I fear that at least one switch is needed, which enables/disables theming on day/night.

No, not if we use Androids day/night system. :grin:

Do you know how this behaves with custom theming? E.g. if I have light blue or a very dark blue, how will both behave on a night/dark mode?

The theme won't chance much, it will basically chance the background color via the Android themes (to be written) and the Nc theming will stay the same. There are certain edge cases where this will be an issue like choosing white or black as Nc's main color where we already have checks to then jump to another color. @juliushaertl what do you think?

There are certain edge cases where this will be an issue like choosing white or black as Nc's main color where we already have checks to then jump to another color.

At least for the places where the theming color is used on a white background, we then need another fallback (besides the one for too bright colors). Otherwise we run into issues with dark theming colors while using the "night mode".

cc @skjnldsv since i remember you thought about a dark mode for accessibility in the server as well.

As for now I think the priorities are somewhere else, but if someone wants to pick this up, first discuss it with @nextcloud/designers and then feel free to implement it.

My request very much a 'nice to have' and is no where near 'mission critical'. Please prioritize as you see fit.

Regarding Android's day/night theming, I prefer to use applications with a dark theme no mater the time of day.

@b-harper that can still be achived with the day/night feature since it has several variations (which you then could choose from) like yes, no, day/night. So you would basically set it to yes, which might be called "dark theme" within the app :grin:

Where do I find these day/night settings? I am running LineageOS and searching within in settings (of android) does not show up anything related.

@tobiasKaminsky that is not in the OS settings but an OS feature apps can implement so that the themeing can be asked if it is day/night where you provide a day and a night theme and the OS decides which one it picks. see https://medium.com/@chrisbanes/appcompat-v23-2-daynight-d10f90c83e94 for example

Yeah, @skjnldsv is the dark theme expert here. :) We could have it in the settings, yes.

Ahaha :D
Yes, it's a feature that should be shipped in 14 :)

I've made a start on this feature using daynight mode to switch between a "light" and "dark" theme. Screenshots:
screenshot_1543928809

screenshot_1543928779

screenshot_1543928783

Could someone with more knowledge of the code base tell me where this text colour is set:
screenshot_1543928720

Could someone with more knowledge of the code base tell me where this text colour is set:

@dan0xii:
https://github.com/nextcloud/android/blob/d3d78ab744474214ba0510bebecbb2fd78976917/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java#L930-L956

@dan0xii awesome as always! :) Do you want to open a work-in-progress pull request so we can already start testing and maybe help out if needed?

are there AMOLED specific considerations?
other apps provide a 'use true black option' within the dark theme (or an extra BLACK theme)
to use the full potential of contrast and energy savings on AMOLED displays.

We need to work step by step. The first step is to have a nice "Dark" theme. Once that is done, we can also get an additional "Black" theme. Feel free to open a separate issue about it.

@jancborchardt Sure, I'll create a PR this weekend for what I have.

@github-tomster The intention is to allow the user to enable a true black version of the dark them should they want it.

+1 for a dark theme with next release.

+1 for a dark theme with next release.

Never going to happen ;) The app's code base moved to AndroidX already, day/night support for AndroidX seems to be supported with 1.1.0 of Android X which is now in alpha-2...

cc @dan0xii fyi, wanted to let you know that we moved on to AndroidX so the theme implementation of yours will need an update. Sorry about that :/

@dan0xii I took the liberty to rebase yur branch and push it to the Nextcloud repo, see https://github.com/nextcloud/android/pull/3459 - it be great if we could work on it from there since then several people can wor on the branch :) Hope that is fine with you 鉂わ笍

No worries. That move to AndroidX really did break a few things(thanks for that :P) that I'm still working through. I've updated the dark_theme branch with my latest version.

Is it possible to cross-check with the other Nextcloud Android apps so they can simply all share the same dark theme? (And light one, but that seems to be the case already. :)

I've attempted to mimic the colours from the nextcloud-notes android app but it would be good to have an agreed scheme/palette. I don't know if it's possible to cross-check without having standardized colour names between apps.

I'd be perfectly fine with standardized color names. So other apps in the ecosystems that don't have theming yet could easily pick it up then :)

Glad to see effort & progress on this. Appreciate everyone here, thank you! :+1:

Any update on this?

@dan0xii @stefan-niedermann is it possible to port the dark theme from Notes to the Files app? :)

I think it might be more effort to port the theme than write it from scratch, because the files app has much more logic (it does not use simply NC blue but the user defined color)

Actually just saw again the almost-done dark theme by @dan0xii in https://github.com/nextcloud/android/issues/2188#issuecomment-444094980 above. :) @dan0xii do you have a pull request for that?

Wouldn't it be useful to make a "library" similar to SSO for that, because there are so many nextcloud apps and there are already requests for black themes for every app I know. So beside the already good overall design, there would be a support for the server theme for every app (probably a bit overkill for this request)?

@jancborchardt we collaborate in #3459 while it still needs quite a bit of work since we need to adapt tthne latests material UI implementation that came after appCompat...

Please, change the colour of header from gray to white with enabled dark theme, as well as the colour of the sandwich menu icon.
Screenshot_20200108-183653

@ostasevych not sure I understand what you mean by header should be gray. The icon and 'community' should both be white IMHO.

Yes, to change from gray to white.

@ostasevych not sure I understand what you mean by header should be gray. The icon and 'community' should both be white IMHO.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JSoko picture JSoko  路  3Comments

JSoko picture JSoko  路  3Comments

rainer042 picture rainer042  路  3Comments

ikke-t picture ikke-t  路  3Comments

tobiasKaminsky picture tobiasKaminsky  路  3Comments