Hi,
Erel's code works well; however, there's a problem with “root.left.”
When using “sensorLandscape,” the value of root.left is 135dip in one direction and 100dip in the other.
This causes the display to shift and get too close to the control buttons.
Erel's code works well; however, there's a problem with “root.left.”
When using “sensorLandscape,” the value of root.left is 135dip in one direction and 100dip in the other.
This causes the display to shift and get too close to the control buttons.
B4X:
Sub Activity_Create(FirstTime As Boolean)
ime.Initialize("ime")
root = xui.CreatePanel("")
Dim Content As Rect = ime.GetContentRect
Activity.Color = Colors.Black
Activity.AddView(root, Content.Left, Content.Top, Content.Width, Content.Height)
ime.UpdatePercentageReference(root.Width, root.Height)
root.LoadLayout("frmMain")
Log("root.left= " & root.Left)
End Sub
*** Receiver (httputils2service) Receive (first time) ***
*** Service (starter) Create completed ***
*** Service (starter) Started ***
** Service (starter) Start **
*** Service (starter) Started completed ***
** Activity (main) Create (first time) **
root.left= 100
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
*** Service (starter) Create ***
*** Receiver (httputils2service) Receive (first time) ***
*** Service (starter) Create completed ***
*** Service (starter) Started ***
** Service (starter) Start **
*** Service (starter) Started completed ***
** Activity (main) Create (first time) **
root.left= 135
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
*** Service (starter) Create ***
*** Receiver (httputils2service) Receive (first time) ***
*** Service (starter) Create completed ***
*** Service (starter) Started ***
** Service (starter) Start **
*** Service (starter) Started completed ***
** Activity (main) Create (first time) **
root.left= 100
** Activity (main) Resume **