Page 1 of 2
native button widget background color
Posted: Sat Mar 09, 2019 7:35 am
by link76
Hello,
from the tools palette I inserted the android native button widget, how can I change the background color?
in the propety inspector it is possible to change only the color of the text.
thank you
Re: native button widget background color
Posted: Sat Mar 09, 2019 11:36 am
by bogs
hello link76,
Are you talking about this?

- Switch the button background color...
Re: native button widget background color
Posted: Sat Mar 09, 2019 12:49 pm
by Klaus
That is the "Switch Button" widget, bogs!
Try harder!
@link76,
looks like this is not possible.
If the inspector for a widget does not provide this you are out of luck.
But I think this is desired behaviour, if you colorize that one, then it
would propbably not be a "native Android button" anymore.
Re: native button widget background color
Posted: Sat Mar 09, 2019 12:56 pm
by bogs
Klaus wrote: ↑Sat Mar 09, 2019 12:49 pm
That is the "Switch Button" widget, bogs!

Try harder!
Ah so! it is the only widget button shown in 8.1.2, I figured it was what they were referring to

Re: native button widget background color
Posted: Sat Mar 09, 2019 1:03 pm
by Klaus
We are not talking about caveman painting, Sir!

Re: native button widget background color
Posted: Sat Mar 09, 2019 1:22 pm
by link76
Klaus wrote: ↑Sat Mar 09, 2019 12:49 pm
That is the "Switch Button" widget, bogs!
Try harder!
@link76,
looks like this is not possible.
If the inspector for a widget does not provide this you are out of luck.
But I think this is desired behaviour, if you colorize that one, then it
would propbably not be a "native Android button" anymore.
Thank you,
I asked, because using the standard button, which allows you to color it, in a mobile environment when I touch the button there seem to be more touches
The native button performs a single correct touch.
Re: native button widget background color
Posted: Sat Mar 09, 2019 2:23 pm
by bogs
Klaus wrote: ↑Sat Mar 09, 2019 1:03 pm
We are not talking about caveman painting, Sir!
It is rather hard to tell in this cave...

- Early 'Protolethzaic' period interface design...
Re: native button widget background color
Posted: Sat Mar 09, 2019 3:13 pm
by richmond62

- Screenshot 2019-03-09 at 16.07.01.png (6.24 KiB) Viewed 9892 times
-
Boh-Boh-Bom!
HOWEVER . . .
While I can change the textColor, I cannot change:
the textFont or the textSize, or mess around with anything else via the properties palette,
or via scripting:
-
-
Which is "a shame".

-
Oh, and while I'm here: some of my best friends are cavemen,
Klaus,
so watch it with the non-PC, Neanderthalist language.
-

- bloke.jpg (5.54 KiB) Viewed 9892 times
Re: native button widget background color
Posted: Sat Mar 09, 2019 3:23 pm
by richmond62
You can, if you are getting really desperate,
layer the widget over a coloured
rectangular object and set the ink of the widget to
blendMultiply, this means,
however, that you had better leave your textColor at the default black:
-
Re: native button widget background color
Posted: Sat Mar 09, 2019 3:38 pm
by link76
richmond62 wrote: ↑Sat Mar 09, 2019 3:13 pm
Screenshot 2019-03-09 at 16.07.01.png
-
Boh-Boh-Bom!
HOWEVER . . .
While I can change the textColor, I cannot change:
the textFont or the textSize, or mess around with anything else via the properties palette,
or via scripting:
-
Screenshot 2019-03-09 at 16.12.58.png
-
Which is "a shame".

-
Oh, and while I'm here: some of my best friends are cavemen,
Klaus,
so watch it with the non-PC, Neanderthalist language.
-
bloke.jpg
I tried but it does not work, the background color is not set.
Code: Select all
on mouseup
set the backGroundColor of widget "test" to "red"
end mouseup
Re: native button widget background color
Posted: Sat Mar 09, 2019 4:38 pm
by richmond62
I explained that setting the
backGroundColor did not work.
However, what I did do is send you a screenShot of a widget Android button
on top of a rectangular graphic and the Ink/blendLevel of the widget set so
that the underlying rectangular graphic was visible.
-
-
Download the stack and play with it: that really will make things clear.

Re: native button widget background color
Posted: Sat Mar 09, 2019 6:13 pm
by jacque
The Android native button doesn't conform to the current Material design theme so I make my own using a roundrect graphic with a 2 degree corner radius. You can color this however you like. While there's no UI for adding a label, you can do it from the message box or by script with "set the label of graphic x to <text string>".
Note that Material uses flat text buttons with no borders or fill for most things. Only important actions use color filled buttons, and those should be used sparingly. Basically colored buttons are used the same way default buttons are in dialogs.
Re: native button widget background color
Posted: Sun Mar 10, 2019 2:53 pm
by richmond62
Stick with
jacque, even if for the simple reason that this:
-
-
is horrible. And the "standard button is awful as well:
-

- Screenshot 2019-03-10 at 15.56.26.png (13.33 KiB) Viewed 9761 times
-
and this "Android Native Button" widget does not show its text in a build:
-

- Screenshot 2019-03-10 at 16.00.51.png (16 KiB) Viewed 9761 times
Re: native button widget background color
Posted: Sun Mar 10, 2019 6:32 pm
by jacque
this "Android Native Button" widget does not show its text in a build:
It does on Android, the native iOS and Android buttons call the OS to create the button, much like native scrollers do. My objection to the Android native button is that it isn't Material design, it's skeuomorphic, which makes the app look dated. The old 3D style went out some years ago.
Re: native button widget background color
Posted: Sun Mar 10, 2019 7:09 pm
by bogs
jacque wrote: ↑Sun Mar 10, 2019 6:32 pm
The old 3D style went out some years ago.
Which means your probably 2 years away from its return, like bell bottoms and platform shoes and tie dye t-shirts
