I have weird problem going on with my buttons on Android.
My buttons are basic text with a background and a dropshadow. They are fine in Windows and on IOS. But when I put them on an Android - IF the button text isn't wide....it creates a box with a different color - sometimes on one side - sometimes on both.
It happens when it goes through code setting the button width such as:
set the width of button "xyz" to tstackwidth*0.88.
I have remade the buttons - no difference. If I add more text to the button label, it goes away. If I reduce the text in the button label, the boxes get bigger.
Very annoying. Is there any way to get rid of the boxes? Thanks
I'm pretty sure you have set that red color in one of the stacks properties.
You'll have to use the inspector and look around, it could be in the stack/card/group/button (others?).
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
OK. I don't know why but this is fixing my problem:
Somehow it is the location of the button that triggers this problem. If I move the button a little bit down, it doesn't create the extra boxes. So, I changed the code from
set the top of button "local_help_button2" to the bottom of button "contacts" +tverticalspace
to
set the top of button "local_help_button2" to the bottom of button "contacts" +tverticalspace*1.1
and voila...no more boxes.
(I don't think it was a parameter that I set because there's nothing except backgroundcolor - which I tried changing without any help on the unwanted boxes. I don't think it's hidden fields because I made all the hidden fields visible to make sure they weren't the cause... My explanation above makes no logical sense...but for some reason corrected the problem. It also explains why creating a new button and putting it in the same place didn't work. In the past, I have had some unwanted boxes in the top right corner of Androids as well - so I think there are certain places that trigger this weird issue.)
These stupid boxes of unwanted color are going to drive me nuts.
I just added some fields with background color - and on the Android, there are boxes of unwanted color wherever there is an empty space - - i.e., if the text is:
John Brown went
to the cafe to have hot chocolate and cookies.
the box will appear next to went - because there is a large space.
And if I make the field wider than the text, the boxes will appear as well.
Plus...if there is any movement (I was experimenting with moving fields) - the boxes are all over the place when it's moving.
It seems they don't appear if the background of the box is white or gray.
Are you using acceleratedRendering? If so, try setting the compositorType to "software". That was the problem with my app in Android 2.2. It's still a bug, but that may be a workaround for now.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
if the platform is "iphone" then
set the compositorType of this stack to "opengl"
else
set the compositorType of this stack to "software"
end if
(put in my stack script)
I added this when I was trying to get the finger scrolling to work better on the mobile devices. If I remove it, the weird boxes go away. So do I have to choose between bad scrolling and weird boxes? I was specifically working on scrolling for the Android - and was told I needed to check the box Layer Mode to scrolling and add this code.
Here's a zipped stack showing the exact problem - with the bad code in it. You can see when you open it up (on an Android) the field background color is all messed up. Then when you click the button and see things moving, it's a real mess - because the background isn't white. When the background is white, then only the boxes are flashing diffferent colors.
I didn't actually install and look at your test stack, but I think you can remove the handler without any problem. If you wrote the original code back when acceleratedRendering was first introduced, you needed to set all its properties in script. But with the latest version of LiveCode default properties are set automatically, and you only need to set them if the defaults don't work. Since removing the handler works okay, that means the defaults are also okay. As long as acceleratedRendering is true, you should still get the benefits of smooth scrolling.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
set the acceleratedRendering of this stack to true
Causes my app not to open in Android. Goes through the entire open script - but then stops - and doesn't open anything. Take out the code and it works.
So...we're back to choosing between scrolling and colors?