Alexander Stolte Expert Licensed User Longtime User Jun 23, 2020 #1 If the App starts with a hidden navigation bar then, all is ok, if i show it. But if i start the app with a displayed navigation bar and hide it then, then the root page is not resizing. Start with hidden navigation bar Start with shown navigation bar B4X: Private Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) Root.Height = NewHeight Panel1.Top = NewHeight - Panel1.Height End Sub Attachments CrossPlatformProject.zip CrossPlatformProject.zip 215.6 KB · Views: 264
If the App starts with a hidden navigation bar then, all is ok, if i show it. But if i start the app with a displayed navigation bar and hide it then, then the root page is not resizing. Start with hidden navigation bar Start with shown navigation bar B4X: Private Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) Root.Height = NewHeight Panel1.Top = NewHeight - Panel1.Height End Sub
Solution Alexander Stolte Jun 25, 2020 Put this Activity.Height = NewHeight to the IME_HeightChanged sub in the Main Activity: B4X: Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) Activity.Height = NewHeight B4XPages.GetManager.RaiseEvent(B4XPages.GetManager.GetTopPage, "IME_HeightChanged", Array(NewHeight, OldHeight)) End Sub This fix it
Put this Activity.Height = NewHeight to the IME_HeightChanged sub in the Main Activity: B4X: Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) Activity.Height = NewHeight B4XPages.GetManager.RaiseEvent(B4XPages.GetManager.GetTopPage, "IME_HeightChanged", Array(NewHeight, OldHeight)) End Sub This fix it
Erel B4X founder Staff member Licensed User Longtime User Jun 24, 2020 #2 This is not a standard Android feature. Is the IME_HeightChanged event raised? Upvote 0
Alexander Stolte Expert Licensed User Longtime User Jun 24, 2020 #3 Erel said: Is the IME_HeightChanged event raised? Click to expand... Yes, the NewHeight is higher then the OldHeight Upvote 0
Erel said: Is the IME_HeightChanged event raised? Click to expand... Yes, the NewHeight is higher then the OldHeight
Erel B4X founder Staff member Licensed User Longtime User Jun 25, 2020 #4 This is not really related to B4XPages. You will get the same behavior without it. If you want to manage this case then you will need to change the activity height based on the NewHeight value. Upvote 0
This is not really related to B4XPages. You will get the same behavior without it. If you want to manage this case then you will need to change the activity height based on the NewHeight value.
Alexander Stolte Expert Licensed User Longtime User Jun 25, 2020 #5 Put this Activity.Height = NewHeight to the IME_HeightChanged sub in the Main Activity: B4X: Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) Activity.Height = NewHeight B4XPages.GetManager.RaiseEvent(B4XPages.GetManager.GetTopPage, "IME_HeightChanged", Array(NewHeight, OldHeight)) End Sub This fix it Upvote 0 Solution
Put this Activity.Height = NewHeight to the IME_HeightChanged sub in the Main Activity: B4X: Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) Activity.Height = NewHeight B4XPages.GetManager.RaiseEvent(B4XPages.GetManager.GetTopPage, "IME_HeightChanged", Array(NewHeight, OldHeight)) End Sub This fix it