In landscape mode, I am using
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
to show and hide navigation bar.
When I create Snackbar while navigation is showing
Snackbar bar = Snackbar.make(snackbarContainer, "exiting", Snackbar.LENGTH_INDEFINITE);
bar.setAction("Testing", new View.OnClickListener() {
@Override
public void onClick(View v) {
//no-op
}
});
bar.show();
The Snackbar's action text is being covered by the navigation bar. Is there a way to adjust snackbar's width automatically based on whether the navigation bar is showing or not?