Hello,
I am making an app that can run in landscape and portrait mode and may be rotated during runtime. In my code I am setting imageviews bitmaps with LoadBitmap corresponding to statuses. According to the orientation, this image must load a rotated image or not. But how can I now distinguish the orientation?
Code:
If i = types.STATE_CONNECTED Then
panta_logo.Bitmap = LoadBitmap(File.DirAssets, "logo_green.png")
else If i = types.STATE_ERROR Then
panta_logo.Bitmap = LoadBitmap(File.DirAssets, "logo_red.png")
Else
panta_logo.Bitmap = LoadBitmap(File.DirAssets, "logo_yellow.png")
End If
Thanks
edit: figured it out. it is pg.RootPanel.Width and height. But is there any event risen when orientation changes?
edit: figured it out. Its the Sub pg_Resize(Width As Int, Height As Int) event that does not appear when I enter the tab page menu. Is it supposed to not show up?