the app that I created used to work just fine, I reinstalled it again and when I click on the button
Forward
Left
Right
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.
Thanks!
here’s the .aia to my project: ServoApp2.aia (120.5 KB)
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.
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.
If the length of the text in the Buttons is constant, there probably will not be issues using the Buttons in a TableArrangement. When the size of the Button width increases is when users run into issues with TableArrangements.
Tim has provided 'one solution' to your issue. Another 'solution' might be to pad the length of the text when you change it so that the text length is always a constant length.