diff --git a/library/src/wei/mark/standout/StandOutWindow.java b/library/src/wei/mark/standout/StandOutWindow.java index 0505aff..1020f98 100644 --- a/library/src/wei/mark/standout/StandOutWindow.java +++ b/library/src/wei/mark/standout/StandOutWindow.java @@ -1097,6 +1097,12 @@ public final synchronized Window show(int id) { // get the params corresponding to the id StandOutLayoutParams params = window.getLayoutParams(); + try { + // force remove the view from the window manager to prevent adding it again + mWindowManager.removeView(window); + } catch(IllegalArgumentException ex) { + } + try { // add the view to the window manager mWindowManager.addView(window, params);