Buttons with transparent background no longer transparent

653 views
Skip to first unread message
Assigned to ewpa...@gmail.com by chrisw...@gmail.com

Martyn_HK

unread,
Aug 3, 2018, 11:21:30 PM8/3/18
to MIT App Inventor Forum
The latest update breaks buttons with transparent backgrounds. Tried on the companion and also compiled; both are the same.

Buttons that have transparent backgrounds show as solid white (maybe very light grey).


TimAI2

unread,
Aug 4, 2018, 4:02:24 AM8/4/18
to MIT App Inventor Forum
Previously discussed, and is an issue following the arrival of the new version, for resolution by MIT

Chris Ward

unread,
Aug 4, 2018, 10:12:18 AM8/4/18
to MIT App Inventor Forum
Change the text colour to a custom colour and the button transparency should return.........

Martyn_HK

unread,
Aug 4, 2018, 11:13:01 PM8/4/18
to mitappinv...@googlegroups.com
Changing to a custom colour didn't work for me.


Chris Ward

unread,
Aug 5, 2018, 6:48:20 AM8/5/18
to MIT App Inventor Forum
Hi Martyn

Can you help us by creating a tiny Project with a single button that will show us what you see?


TimAI2

unread,
Aug 5, 2018, 4:04:04 PM8/5/18
to mitappinv...@googlegroups.com
hmmm, doesn't seem to work with the Default shape, but changing to Rounded/Rectangular/Oval works...

Just change the colour to custom, and ensure it ends with 00

e.g. #3f51b500

SteveJG

unread,
Aug 5, 2018, 4:22:41 PM8/5/18
to mitappinv...@googlegroups.com
@Tim    The Math block with #00000000   works on an Android 7.0  but not on an Android 4.2.2    In fact, using the Button1.BackGround to none  works on the Android 7.0 but not on the Android 4.2.2.
when using the GooglePlay build.

The problem appears related to the device operating system that is used for testing.  Android 7 works fine; 4.2.2 (and perhaps others) does not.


oops...sent this too soon.  With a colored background, transparency fails.

--Steve

TimAI2

unread,
Aug 5, 2018, 4:27:16 PM8/5/18
to MIT App Inventor Forum
A can of worms / bag of snakes / box of frogs :)

Martyn_HK

unread,
Aug 7, 2018, 12:41:03 AM8/7/18
to mitappinv...@googlegroups.com
Hi Chris,

here you are.

This is basically the same as used in the main project. Transparent buttons on top of a background image to create a splash screen with a flashing message.

Using a Samsung S6 with Android 7.



Edit: changing the button shape worked. Any shape other than default works.

ButtonColourTest.aia

Martyn_HK

unread,
Aug 7, 2018, 1:53:34 AM8/7/18
to mitappinv...@googlegroups.com
Just built the app and installed on the Samsung. Using rounded buttons. The transparency works but I am now getting button outlines that I didn't have before.

I don't get the lines when using the companion.

dC.png

Chris Ward

unread,
Aug 7, 2018, 5:45:46 AM8/7/18
to MIT App Inventor Forum
...that might be a good thing Martyn, how else will the User even know a button is there?

The outline is probably to do with Themes/Styles. I think it is possible that a Theme introduces button outlines, perhaps with options (such as colour, level of transparency etc) ..... way beyond App Inventor's current properties palette.

Default - by definition, selecting a default could mean you are happy with whatever the device manufacturer thinks is good, so you have no control of the final appearance. Note that Samsung do not use verbatim Android, they have their own stuff on top......


Martyn_HK

unread,
Aug 7, 2018, 8:55:57 AM8/7/18
to mitappinv...@googlegroups.com
The user isn't supposed to know. All they know is they need to tap the screen so using invisible buttons was fine.

The buttons worked on the same phone before the recent update.

I changed the layout. I now use 2 images, same image but one has the "Tap to start" text and switch the images. Looks like the text is flashing just the same.
On top of this I have a single transparent button 100% x 100%. It appears to be working well.



Evan Patton

unread,
Aug 7, 2018, 7:24:46 PM8/7/18
to MIT App Inventor Forum
Hi all,

This is a known issue and we are tracking it on GitHub as issue #1318. It seems to me like it is only affecting Android versions below 5.0. If that is not the case please let me know.

Thanks,
Evan

BodyMindPower

unread,
Aug 9, 2018, 5:19:14 AM8/9/18
to mitappinv...@googlegroups.com
Hi Evan,

It is affecting also Android versions above 5.0. On those versions there is a gray border around the buttons.

I have yet posted this yesterday in the forum:
There is a simple workaround until the MIT team has solved this issue:

Take a small image (for example: 10x20px), background transparent, format (png): imageButton.png.
Button -> Image = imageButton.png
The problems with the gray borders / background are gone.

The theme does not matter.

Greetings,
Anke

Tested on Android 7.0, Android 8.1 and Android P Beta with the compiled app.
(Build: "App for Google Play")

The apk was removed.  The Forum does not permit the posting of apk files as a security issue.  You are welcome to post a screen or block image and/or an aia file. Please DO NOT post apk files to this Forum.
transp_Buttons.aia
Reply all
Reply to author
Forward
0 new messages