Buttons with custom images, and manually set sizes (45/45) wont go invisible on an event handler as expected

Describe your issue

If you add an img to a button, and then try to toggle when it is visible and not, it will not go invisible once it has been made visible.

Steps to reproduce the issue

two images uploaded to assets (pngs), manually set them to 45/45 pixels on each of two buttons. Set two buttons and two labels. Error also occurs if you leave the settings to automatic.

Companion and APK.

Expected Behaviour

Once a button is toggled through an event to be invisible, it is expected to do just that.

Actual Behaviour

The buttons are not disappearing, Well in actuality the logic of the button is disappearing, but it appears that the image is not.

Show your Blocks . updated for accurate logic

Android version

7.0

2 Likes

Hope. That when button one clicked, button 1 or 2 should be set as false. But u set that both are true.

Pasted the wrong blocks. Thank you. Correct blocks above.

WORKAROUND

When you declare a button invisible you have to set the image, text and background colour to nothing as well. When you set it to visible you have to redeclare those three things. Pain in the butt, however it does work.

4 Likes

Or disable the Show Feedback for buttons with images.

bild

ButtonTest.aia (4.5 KB)

/Boban

2 Likes

Boban, what is the “show feedback” please? I do not understand what type of feedbback it is looking for. I will try it for sure, as that might help mitigate this bug. My workaround highlighted another bug issue.

1 Like

it shows that you actually press the button, left with Show Feedback and right without.

20190210_021718

/Boban

3 Likes

Show Feedback true causes this if the button contains image.

20190210_113957

Through the blocks work just to set to true, false do not.
bild

However, in the blocks it reports that it is false
bild

Something for @KodularCreator to take a look at.

/Boban

4 Likes

I was going crazy with this. Spent a few hours trying to understand it. Finally I found this topic and it is really a bug.
Thanks @Boban and @cian for the solutions!

4 Likes