Check out example codes for "android snackbar message is behind back button". It will help you in understanding the concepts better.

Code Example 1

FloatingActionButton fab = findViewById(R.id.fab);
Snackbar snackbar = Snackbar.make(view, "Snackbar over BottomAppBar", Snackbar.LENGTH_LONG);
snackbar.setAnchorView(fab);

Learn ReactJs, React Native from akashmittal.com