Open assilMekki opened 6 years ago
I am facing same issue. Have you find any solution?
Unfortunately no.
Is there any even which provide us Navigation bar is hidden or not? I have tried with many solutions but it was not work. Due to Android P Navigation Gesture I am facing same problem.
Hello,
I resolved this issue by writing this code in my activity:
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
getWindow().getDecorView().setOnApplyWindowInsetsListener(new View.OnApplyWindowInsetsListener() {
@Override
public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) {
resideMenu.post(new Runnable() {
@Override
public void run() {
resideMenu.setPadding(resideMenu.viewActivity.getPaddingLeft() + insets.getSystemWindowInsetLeft(),
resideMenu.viewActivity.getPaddingTop() + insets.getSystemWindowInsetTop(),
resideMenu.viewActivity.getPaddingRight() + insets.getSystemWindowInsetRight(),
insets.getSystemWindowInsetBottom());
}
});
return insets.consumeSystemWindowInsets();
}
});
}
Note: I've imported this project as a module in my app and made 'TouchDisableView' as 'public class'
I am running this library ( Great work) in my App and when I test run on a Samsung s8 Plus( that has the option to hide and show the navigation bar ) the Activity that I attache ResideMenu to stopped resizing when the NavigationBar is shown or hidden.
I found the bit of code where you make space for the softKeys and I saw the issues where the activity was showing behind the NavigationBar So I understand it's purpose.
Si if it's can you help me to get the Activity to resize when the NavigationBar is shown/hidden ?
Thank you.