+ *
+ * Functionality includes system window decorators, moveable, resizeable, + * hideable, closeable, and bring-to-frontable. + *
+ *
+ * The persistent notification creates new windows. The hidden notifications
+ * restores previously hidden windows.
+ *
+ * @author Mark Wei
+ * This flag also sets {@link #FLAG_DECORATION_SYSTEM}.
+ */
+ public static final int FLAG_DECORATION_CLOSE_DISABLE = FLAG_DECORATION_SYSTEM
+ | 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the window decorator should NOT provide
+ * a resize handle.
+ *
+ *
+ * This flag also sets {@link #FLAG_DECORATION_SYSTEM}.
+ */
+ public static final int FLAG_DECORATION_RESIZE_DISABLE = FLAG_DECORATION_SYSTEM
+ | 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the window decorator should NOT provide
+ * a resize handle.
+ *
+ *
+ * This flag also sets {@link #FLAG_DECORATION_SYSTEM}.
+ */
+ public static final int FLAG_DECORATION_MAXIMIZE_DISABLE = FLAG_DECORATION_SYSTEM
+ | 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the window decorator should NOT provide
+ * a resize handle.
+ *
+ *
+ * This flag also sets {@link #FLAG_DECORATION_SYSTEM}.
+ */
+ public static final int FLAG_DECORATION_MOVE_DISABLE = FLAG_DECORATION_SYSTEM
+ | 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the window can be moved by dragging the
+ * body.
+ *
+ *
+ * Note that if {@link #FLAG_DECORATION_SYSTEM} is set, the window can
+ * always be moved by dragging the titlebar regardless of this flag.
+ */
+ public static final int FLAG_BODY_MOVE_ENABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that windows are able to be hidden, that
+ * {@link StandOutWindow#getHiddenIcon(int)},
+ * {@link StandOutWindow#getHiddenTitle(int)}, and
+ * {@link StandOutWindow#getHiddenMessage(int)} are implemented, and that
+ * the system window decorator should provide a hide button if
+ * {@link #FLAG_DECORATION_SYSTEM} is set.
+ */
+ public static final int FLAG_WINDOW_HIDE_ENABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the window should be brought to the
+ * front upon user interaction.
+ *
+ *
+ * Note that if you set this flag, there is a noticeable flashing of the
+ * window during {@link MotionEvent#ACTION_UP}. This the hack that allows
+ * the system to bring the window to the front.
+ */
+ public static final int FLAG_WINDOW_BRING_TO_FRONT_ON_TOUCH = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the window should be brought to the
+ * front upon user tap.
+ *
+ *
+ * Note that if you set this flag, there is a noticeable flashing of the
+ * window during {@link MotionEvent#ACTION_UP}. This the hack that allows
+ * the system to bring the window to the front.
+ */
+ public static final int FLAG_WINDOW_BRING_TO_FRONT_ON_TAP = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the system should keep the window's
+ * position within the edges of the screen. If this flag is not set, the
+ * window will be able to be dragged off of the screen.
+ *
+ *
+ * If this flag is set, the window's {@link Gravity} is recommended to be
+ * {@link Gravity#TOP} | {@link Gravity#LEFT}. If the gravity is anything
+ * other than TOP|LEFT, then even though the window will be displayed within
+ * the edges, it will behave as if the user can drag it off the screen.
+ *
+ */
+ public static final int FLAG_WINDOW_EDGE_LIMITS_ENABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the system should keep the window's
+ * aspect ratio constant when resizing.
+ *
+ *
+ * The aspect ratio will only be enforced in
+ * {@link StandOutWindow#onTouchHandleResize(int, Window, View, MotionEvent)}
+ * . The aspect ratio will not be enforced if you set the width or height of
+ * the window's LayoutParams manually.
+ *
+ * @see StandOutWindow#onTouchHandleResize(int, Window, View, MotionEvent)
+ */
+ public static final int FLAG_WINDOW_ASPECT_RATIO_ENABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the system should resize the window when
+ * it detects a pinch-to-zoom gesture.
+ *
+ * @see Window#onInterceptTouchEvent(MotionEvent)
+ */
+ public static final int FLAG_WINDOW_PINCH_RESIZE_ENABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the window does not need focus. If this
+ * flag is set, the system will not take care of setting and unsetting the
+ * focus of windows based on user touch and key events.
+ *
+ *
+ * You will most likely need focus if your window contains any of the
+ * following: Button, ListView, EditText.
+ *
+ *
+ * The benefit of disabling focus is that your window will not consume any
+ * key events. Normally, focused windows will consume the Back and Menu
+ * keys.
+ *
+ * @see {@link StandOutWindow#focus(int)}
+ * @see {@link StandOutWindow#unfocus(int)}
+ *
+ */
+ public static final int FLAG_WINDOW_FOCUSABLE_DISABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the system should not change the
+ * window's visual state when focus is changed. If this flag is set, the
+ * implementation can choose to change the visual state in
+ * {@link StandOutWindow#onFocusChange(int, Window, boolean)}.
+ *
+ * @see {@link Window#onFocus(boolean)}
+ *
+ */
+ public static final int FLAG_WINDOW_FOCUS_INDICATOR_DISABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the system should disable all
+ * compatibility workarounds. The default behavior is to run
+ * {@link Window#fixCompatibility(View, int)} on the view returned by the
+ * implementation.
+ *
+ * @see {@link Window#fixCompatibility(View, int)}
+ */
+ public static final int FLAG_FIX_COMPATIBILITY_ALL_DISABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the system should disable all additional
+ * functionality. The default behavior is to run
+ * {@link Window#addFunctionality(View, int)} on the view returned by the
+ * implementation.
+ *
+ * @see {@link StandOutWindow#addFunctionality(View, int)}
+ */
+ public static final int FLAG_ADD_FUNCTIONALITY_ALL_DISABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the system should disable adding the
+ * resize handle additional functionality to a custom View R.id.corner.
+ *
+ *
+ * If {@link #FLAG_DECORATION_SYSTEM} is set, the user will always be able
+ * to resize the window with the default corner.
+ *
+ * @see {@link Window#addFunctionality(View, int)}
+ */
+ public static final int FLAG_ADD_FUNCTIONALITY_RESIZE_DISABLE = 1 << flag_bit++;
+
+ /**
+ * Setting this flag indicates that the system should disable adding the
+ * drop down menu additional functionality to a custom View
+ * R.id.window_icon.
+ *
+ *
+ * If {@link #FLAG_DECORATION_SYSTEM} is set, the user will always be able
+ * to show the drop down menu with the default window icon.
+ *
+ * @see {@link Window#addFunctionality(View, int)}
+ */
+ public static final int FLAG_ADD_FUNCTIONALITY_DROP_DOWN_DISABLE = 1 << flag_bit++;
+}
\ No newline at end of file
diff --git a/integrationExample/app/src/main/java/wei/mark/standout/ui/TouchInfo.java b/integrationExample/app/src/main/java/wei/mark/standout/ui/TouchInfo.java
new file mode 100644
index 0000000..5214596
--- /dev/null
+++ b/integrationExample/app/src/main/java/wei/mark/standout/ui/TouchInfo.java
@@ -0,0 +1,32 @@
+package wei.mark.standout.ui;
+
+import java.util.Locale;
+
+/**
+ * This class holds temporal touch and gesture information. Mainly used to hold
+ * temporary data for onTouchEvent(MotionEvent).
+ *
+ * @author Mark Wei