Android Question Refresh Activity.Width

danijel

Active Member
Licensed User
Longtime User
Is there way to "refresh" Activity.Width after HeightChanged?
I need it on orientation change.
With this code Activity width and height is always the same after orientation change...


B4X:
Sub IME1_HeightChanged(NewHeight As Int, OldHeight As Int)

        ToastMessageShow("Width= "  & Activity.Width & CRLF & _
                         "Height= " & Activity.Height, False)
  
End Sub
 

danijel

Active Member
Licensed User
Longtime User
Thx Erel, but I have this in manifest:
B4X:
SetActivityAttribute(Main, android:configChanges, "orientation|keyboardHidden|screenSize")
So activity will not recreate. I am just curious is it possible to just refresh width and height without recreating all activity and remember all view states.
 
Upvote 0
Top