How do you switch between dark theme and light theme?

Dear Experts,
With your help, I've written (?) app used by my friends. Now they request:

  • a switch to switch between dark and light (day?) mode, or
  • ability to follow device dark/light mode

Background
In classic theme Samsungs display all in light (I use default colors for background and text/labels). Xiaomis do force dark/light as set on device.
Dark mode is needed for night operation of the app as well as for battery saving outdoor in the winter.

App specifics
I used classic theme but I can switch to any other - just need a switch to switch dark and light mode (allowing app to follow device setting is fine).
App screens (7) usually have master layout (either VerticalAlignment or VerticalScrollAlignment) containing all others. Anything in these is either transparent (layouts) or default (labels and text boxes). Ignore other components.
Screens have up to 3'000 or nearly 8000 blocks and many fields so forget setting each field (label, text) one-by-one.
I tried setting screen1 theme but it looks like design-time-only.

Any suggestions ? Am I missing some basic stuff? Extensions?

Show your relevant blocks

means only can be set / reset using Properties of Screen1 in the Designer :wink:
Reset the Project, then change the Theme in the Designer to what you want and run your app with the different Theme.

I do not have yet blocks for changing theme.

So how to do it on runtime when app is running?

It is not possible to change the Theme while the app is running with Blocks.
You can only change the Theme in the Designer.

Here is as close as you can get in blocks:
everything.aia (2.6 KB)

You can add more modes and component types as needed.

1 Like

Dear @ABG, thanks for pointing out "every" - this solves many things. The one remaining is how to retain nice underline in material design (for clasical-like I can use Decoration component to draw box around textbox) ?

That sounds fancy.

I don't do fancy.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.