Changing Screen.BackgroundColor does not work with the APK correctly

Try this aia testSreenBackgroundColor.aia (7.3 KB) and check if Screen.BackgroundColor is changing using the Slider with Companion.
It should work as expected.

Then try the same with the APK ...

I have no idea what's going on. :upside_down_face:
It only works if not Theme "Dark" is used.

There are only two blocks:

Summary

It might be due to transparency. (Not sure)

So it seems what I was already assuming to be a bug.
@ewpatton

Just to clarify, which behavior are you claiming is the buggy behavior? If I had to guess, it is that the background color is light in the companion even though the Dark theme is selected. Having tried in the companion and in the APK, I believe the APK behavior is correct and that the companion is wrong.

No.

I think my description was pretty clear. But again, when the thumb position is moved to the left, the background color should get lighter and at minimum (0) it should be white. This is exactly the case with Companion, while with the APK it is exactly the opposite. I have tested it on different Android versions (including Android 9, 11 and 12).

If I do not use Theme "Dark" (but theme "Device Default"), it works as expected.

Btw, why do I have to use the "Dark" theme with AI2 to make checkboxes (well) visible on dark backgrounds? Only then will they be displayed brightly.

If I use eg Theme "Device Default" the checkboxes are displayed in dark (almost black) color. So I can't use dark backgrounds then. One should/must also have the ability to customize the color of the checkboxes with AI2 (like Kodular does).

2 Likes

Then making an extension would be the best choice.

I think this should/must be possible without an extension, so only with the CheckBox component.
But in the end you may not have any other choice.

1 Like

I believe "Device Default" is equivalent to Light Theme in Kodular, so the backgrounds should be bright, while "Dark" is equivalent to Dark Theme in Kodular, so the backgrounds should be dark.

Sorry, but it's actually very confusing, not least because you have to keep switching (testing) between Companion and the APK.

Here's a simple example that hopefully makes it clear.
screenBackgroundThemeDark.aia (2.9 KB)
It can (of course currently) only be tested with the APK.

Blocks

Note: If Theme "Device Default" is chosen, the background of Screen1 will be white (and not light grey, for example; ok let's accept it then). But if "Dark" theme was chosen, the background of Screen1 is shown as dark gray and not black (which actually would be consistent). In other words, why not let the app developer do what he / she prefers?

To make the unchecked checkbox visible on a white background, you have to put the checkbox in an arrangement and darken the background (as demonstrated in my test app).

So basically there should be an option to customize the color of the checkbox (I mean the border of the checkbox, of course).

1 Like

grafik

2 Likes

It would be helpful if someone could create a Checkbox extension to customize the color (of the border) of the checkbox (regardless of the chosen Theme (Dark, DeviceDefault, ...).

Or is there already one that I've missed?

In the extensions directory, I can't find one.

2 Likes

The extension is almost done. I am working on the community post.

Classic:

image

Device Default:

image

Dark (you have to add a block to set the text color in the Blocks editor):

image

1 Like

Fine, but I've already switched to Niotron, at least with the relevant project where this feature was a must. In addition, other settings for the checkboxes can also be made with Niotron.

1 Like

Great ... :+1:

1 Like

But I think that this feature should (also) be available without an extension.

1 Like

Finally completed.

2 Likes