AutoScaleAll (Script) with RerunDesignerScript

lhbrito

Member
Licensed User
Longtime User
Hello,

In my application I used the command inside the event Activity.RerunDesignerScript IME_HeightChanged for the layout still fully visible, as is mentioned in some tips here in the forum.

Running on my phone (LG GT-540F with Android 2.1) works perfectly.

Running on my tablet (Samsung GT-P7510 with Android 3.1) components (EditText, Button, Label, etc.) getting bigger as I click to hide and display the virtual keyboard on the screen.

I am attaching a test project where the problem occurs.

The step to reproduce (in the tablet) are:

- Clicking on the EditText to open the keyboard on tablet
- Click the "Arrow" button to close the keyboard on tablet
- Clicking on the EditText to open the keyboard again
- Close the keyboard again
(always repeat this procedure)

Each time that opens and closes the keyboard, increases the size of the components (very).

Just get to test these two devices.

What am I doing wrong?

Thanks
 

Attachments

  • Error_ReRunScript.zip
    34.1 KB · Views: 168

lhbrito

Member
Licensed User
Longtime User
Right, but in this case I have to always "double" the layout file to have two different scripts (application maintenance becomes more difficult this way)

It would be nice if the script we had to read the property "Tag" any object (including the Activity). Thus, we can create a control in the script, something like:

B4X:
If Activity.Tag = 0 Then
   AutoscaleAll
   Activity.Tag = 1
end If

Or if you had an internal variable "FirstTime" (as the event Create activity)

B4X:
If FirstTime Then
   AutoScaleAll
end If

Is something like this possible?
 
Upvote 0
Top