+ // Instantiate the dismiss snackbar interface.
+ private DismissSnackbarInterface dismissSnackbarInterface;
+
+ // Define the public dismiss snackbar interface.
+ public interface DismissSnackbarInterface {
+ void dismissSnackbar();
+ }
+
+ public void onAttach(@NonNull Context context) {
+ // Run the default commands.
+ super.onAttach(context);
+
+ // Populate the dismiss snackbar interface.
+ dismissSnackbarInterface = (DismissSnackbarInterface) context;
+ }
+