Reputation: 5084
The Snackbar covers the control buttons of the Google Pixel device. The device is running Nougat and the screenshot illustrates the issue:
This is happening due to the buttons being virtual. What changes are required to avoid this issue in devices where the control buttons are virtual?
Code:
Snackbar.make(MainActivity.this.getWindow().getDecorView(), getString(R.string.incorrect_details), Snackbar.LENGTH_LONG).show();
Upvotes: 1
Views: 685
Reputation: 2148
Use as the first parameter android.R.id.content
Snackbar.make(findViewById(android.R.id.content), getString(R.string.incorrect_details), Snackbar.LENGTH_LONG).show();
Upvotes: 4