Snackbar behind navigation bar
<p>In landscape mode, I am using</p>

<pre><code>    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);
</code></pre>

<p>to show and hide navigation bar.</p>

<p>When I create Snackbar while navigation is showing</p>

<pre><code>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();
</code></pre>

<p>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?</p>