Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Compatible with hide and showing Navigation bar #140

Open
assilMekki opened this issue Mar 8, 2018 · 4 comments
Open

Not Compatible with hide and showing Navigation bar #140

assilMekki opened this issue Mar 8, 2018 · 4 comments

Comments

@assilMekki
Copy link

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.

@Nik2505
Copy link

Nik2505 commented Mar 4, 2019

I am facing same issue. Have you find any solution?

@assilMekki
Copy link
Author

Unfortunately no.

@Nik2505
Copy link

Nik2505 commented Mar 5, 2019

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.

@DevRahul123
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants