Android Question Screen Rotation Causing problems

iCAB

Well-Known Member
Licensed User
Longtime User
Hi There

I am facing an issue in the following case:
  • Custom popup displayed
  • I start another app from within our app. This new app rotates the screen
  • When control is given back to our app, the custom popup disappears
I tried to force screen orientation in Activity resume as follows
B4X:
SetScreenOrientation(1)

the above didn't help.

Any suggestions?

Thanks in advance
 

iCAB

Well-Known Member
Licensed User
Longtime User
Hi Erel

Thanks for your reply.
I already have that in place

B4X:
#SupportedOrientations: portrait
 
Upvote 0

iCAB

Well-Known Member
Licensed User
Longtime User
Something is not right. Here is more info:
  • We are using Square POS
  • Square provides the option to capture signature or not after a transaction is completed
  • With Signature capture option on, the orientation switches to landscape and back portrait. That's the only thing I see different than the no signature option
  • The popup gets dismissed only in case the signature option is turned on
Any ideas what could be dismissing the popup other than the orientation in this case?
 
Upvote 0

iCAB

Well-Known Member
Licensed User
Longtime User
It's a panel added by code, with scrollview and some other controls.

B4X:
    Dim PopupPanel As Panel   
    Dim LocalEventName As String = GetItemTypeForEventLog( LayoutNonGUI.LAY_PANEL )
    
    AddEvent( LayoutNonGUI.LAY_PANEL, PanelTag, PanelEventName )
    
    PopupPanel.Initialize(LocalEventName)
    PopupPanel.Tag = PanelTag
    PopupPanel.Color = iBackColor
    ParentPanel.AddView(PopupPanel, fltLeft, fltTop,fltWidth, fltHeight)
 
Upvote 0
Top