Button's Text disappear

the app that I created used to work just fine, I reinstalled it again and when I click on the button

  1. Forward
  2. Left
  3. Right
  4. Stop

the text disappears when I click on the button, I don’t know why and I couldn’t find any explanation to this.
After restarting the app the text appears again but disappears once I click on it again

please suggest a solution to this.


here’s the .aia to my project:
ServoApp2.aia (120.5 KB)

Is the button in a table arrangement ?

See here:

Do you see this behavior in the companion app, a compiled app, or both?

Yeah, the buttons are in table arrangement

This occurred when I installed the app on my phone, the error was rectified when I just used buttons without putting them in a table arrangement

Try this: ServoApp2a.aia (120.5 KB)

The only way to do it your way within a table is to change the text (fi by adding a space at the end) on each button click:


ServoApp2b.aia (120.9 KB)

This is a bug and happens with Companion & AKP. @ewpatton

Interestingly, this doesn’t happen on older version of Android (I tried 5.1), but it does on newer versions (Android 8.1). I’m not necessarily sure this is a regression in our code… I’m still trying to determine the underlying problem though.

Edit: From my testing, it appears that this bug started manifesting with Android 7.0. Testing using the companion on older versions of Android exhibits the correct behavior.

Yes, I can confirmed it (on my devices Android 4.3 -10).
But what impact could the Android version have on a TableArrangement?
Since this issue only occurs there.

Btw, same with Kodular.

I add a new TableArr below and this issue is solved for both TableArr:


So something with the first TableArr seems to be broken.

ServoApp2c.aia (120.7 KB)

When I start a new project with this TableArr I have no issues on my test devices (Android 7, 9).

Strange, if I set one of these TableArr to invisible, this problem reappears …

So just a follow up as I’ve been trying to figure this out. What I’ve discovered through my debugging is that for a yet-to-be-determined reason that the baseline on the Buttons in the TableLayout is changing. I think this is causing the text to be drawn off the screen. For reference, the baseline on the “Bluetooth” button is 71, but when the text on the buttons disappear those buttons indicate a baseline of 185. The measured height of those buttons is also reporting as 354, which also doesn’t make sense given they are automatic height (and the other button measures at 126).

I’m going through the Android and App Inventor sources to see if I can figure out the root cause.

Another observation that might help:
If I disable this block, the problem does not arise:


Changing color is not the problem but changing the Label.Text.
If I try this:

there is no problem.

ServoApp2d.aia (121.2 KB)

Here is a new simple test app of this strange behavior:
tableArr_ButtonText.aia (119.6 KB)

The same with Kodular:

Another observation: If Button.width is set to automatic (instead of 33%) it works.

If any property of any element (button) in the table is changed or set again, this issue doesn’t arise.