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