E EvgenyB4A Active Member Licensed User Longtime User Jun 29, 2016 #1 I have Android 5.1 device that has a custom function to show/hide navigation bar by broadcast sending. The function does implement show and hide the bar, but the activity height doesn't change and after hiding there is black rectangle in place of bar. If you then restart the app the activity size is changed. At the same application that was created by Android Studio the activity size is automatically changed after hide/show the bar. I'd like to see the same behavior from B4A.
I have Android 5.1 device that has a custom function to show/hide navigation bar by broadcast sending. The function does implement show and hide the bar, but the activity height doesn't change and after hiding there is black rectangle in place of bar. If you then restart the app the activity size is changed. At the same application that was created by Android Studio the activity size is automatically changed after hide/show the bar. I'd like to see the same behavior from B4A.
Cableguy Expert Licensed User Longtime User Jun 29, 2016 #2 After hiding thé bar, call activity.invalidate to force a redraw Upvote 0
E EvgenyB4A Active Member Licensed User Longtime User Jun 29, 2016 #3 Cableguy said: After hiding thé bar, call activity.invalidate to force a redraw Click to expand... I tried this and it doesn't help. Upvote 0
Cableguy said: After hiding thé bar, call activity.invalidate to force a redraw Click to expand... I tried this and it doesn't help.
Cableguy Expert Licensed User Longtime User Jun 29, 2016 #4 Then re-run the designer scripts... Upvote 0
E EvgenyB4A Active Member Licensed User Longtime User Jun 29, 2016 #5 It also doesn't help. I think the problem is that the size of activity is not recalculated after show/hiding the bar. Upvote 0
It also doesn't help. I think the problem is that the size of activity is not recalculated after show/hiding the bar.
Cableguy Expert Licensed User Longtime User Jun 29, 2016 #6 As a last resort, try to call activity resume... but keep in mind that, if you have volatile data, you need to manage it too Upvote 0
As a last resort, try to call activity resume... but keep in mind that, if you have volatile data, you need to manage it too
E EvgenyB4A Active Member Licensed User Longtime User Jun 29, 2016 #7 Cableguy said: As a last resort, try to call activity resume... but keep in mind that, if you have volatile data, you need to manage it too Click to expand... Also tried with same result. Maybe need any Java code or library? Upvote 0
Cableguy said: As a last resort, try to call activity resume... but keep in mind that, if you have volatile data, you need to manage it too Click to expand... Also tried with same result. Maybe need any Java code or library?
Cableguy Expert Licensed User Longtime User Jun 29, 2016 #8 Shouldn't be needed... can you reproduce it in a "simple" project and export it as zip? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 30, 2016 #9 Handling activity size changes is not simple. You can see an example here: https://www.b4x.com/android/forum/t...through-orientation-change.37511/#post-222072 Upvote 0
Handling activity size changes is not simple. You can see an example here: https://www.b4x.com/android/forum/t...through-orientation-change.37511/#post-222072
E EvgenyB4A Active Member Licensed User Longtime User Jun 30, 2016 #10 Erel said: Handling activity size changes is not simple. You can see an example here: https://www.b4x.com/android/forum/t...through-orientation-change.37511/#post-222072 Click to expand... Thank you very much. The functions from the above example are useful and work in my project. I think that these features of activity resizes should be bult-in in B4A and appear in next releases. Upvote 0
Erel said: Handling activity size changes is not simple. You can see an example here: https://www.b4x.com/android/forum/t...through-orientation-change.37511/#post-222072 Click to expand... Thank you very much. The functions from the above example are useful and work in my project. I think that these features of activity resizes should be bult-in in B4A and appear in next releases.
Erel B4X founder Staff member Licensed User Longtime User Jun 30, 2016 #11 In almost all cases activities do not change sizes. Instead the activity is recreated. You can do the same thing in this case with: Code: Activity.Finish StartActivity(Me) Upvote 0
In almost all cases activities do not change sizes. Instead the activity is recreated. You can do the same thing in this case with: Code: Activity.Finish StartActivity(Me)