barbeau / gpstest

The #1 open-source Android GNSS/GPS test program
Apache License 2.0
1.78k stars 364 forks source link

Add Blackout Dark / themed dark mode #277

Open barbeau opened 5 years ago

barbeau commented 5 years ago

Summary:

From user:

please add a real black theme for amoled. and grey theme isn't dark.

I'd like this too. There are some dark theme options for later versions of Android that we aren't currently using that we can take a look at:

Steps to reproduce:

Go to settings and enable "Dark mode"

Expected behavior:

Give me an option for blackout mode option for true black background, or make dark mode darker

Observed behavior:

Dark mode has dark gray background

Device and Android version:

N/A

mickhayes commented 5 years ago

Looking at gpstest Settings (3.3.4) "Use Dark Theme"

Black is 0xff000000 in Alpha-R-G-B - https://developer.android.com/reference/android/graphics/Color

In GPSTest\src\main\res\values\colors.xml:

@color/cardview_dark_background

This has Alpha-R-G-B value: FF 20 20 20, i.e. not totally black.

Looking at setCardBackgroundColor...

barbeau commented 5 years ago

@mickhayes The current theming in GPSTest is a mix of legacy Android themeing and manually adjusting colors when the legacy theme didn't work for whatever reason. So unfortunately it's not going to be as simple as just changing cardview_dark_background. I'm hopeful that the new system theme support for dark mode in Android (see above links in initial post) will simplify a lot of this code, although I haven't had a chance to deep-dive on this myself.

barbeau commented 5 years ago

Here's the original commit that adding support for the dark theme, although the implementation has gotten more complex over time with later additions to Sky and Accuracy views, etc.: https://github.com/barbeau/gpstest/commit/3939beb447dba06971cec70e04b363307f5fefe5

But you can see the use of the system AppTheme.Dark.NoActionBar theme there.

barbeau commented 5 years ago

Google I/O 2019 app code is now live, which includes dark theme implementation: https://9to5google.com/2019/08/14/io-2019-open-source/amp/

barbeau commented 5 years ago

See Dark Theme in material components: https://material.io/develop/android/theming/dark/

GeoZac commented 4 years ago

Maybe a explanation not to adopt the darkest black and stick to the Material Themes : https://www.xda-developers.com/amoled-black-vs-gray-dark-mode/

sm4rk0 commented 4 years ago

That article makes sense, but

  1. This app has #303030 for "dark" background (Although a comment above says #202020. I took a screenshot and opened it in Simple Draw app, then went to color chooser and picked the same color), which is far brighter than #121212 from the article
  2. Some people just prefer black over (dark) gray, regardless of battery savings
barbeau commented 4 years ago

Hopefully switching to the official dark mode will also fix this issue in Settings on legacy devices:

In the dark environment with dark mode I can't see what option, it is or not selected!

App version: v3.6.4 (18066-google) Model: E39 Android version: 4.4.2 / 19

image

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

barbeau commented 3 years ago

This should include the settings for:

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

barbeau commented 1 year ago

Not stale

stale[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

barbeau commented 6 months ago

Not stale