Code example for PopupWindow

Methods: dismissshowAsDropDown

0
      assertSame(background, shadowWindowManager.getViews().get(0).getBackground());
    } 
 
    @Test 
    public void dismiss_removesContainerFromWindowManager() throws Exception { 
      PopupWindow popupWindow = new PopupWindow(contentView);
      popupWindow.showAsDropDown(anchor);
      popupWindow.dismiss();
      assertEquals(0, shadowWindowManager.getViews().size());
    } 
  } 
} 
Contextual code suggestions in your IDE  Get Codota for Java