Code example for PopupWindow

Methods: showAsDropDown

0
      assertNotNull(shadowWindowManager.getViews().get(0).findViewById(R.id.content_view));
    } 
 
    @Test 
    public void showAsDropdownWithOffsets_setsOffsetFields() throws Exception { 
      PopupWindow popupWindow = new PopupWindow(contentView, 0, 0, true);
      popupWindow.showAsDropDown(anchor, 56, 69);
      assertEquals(shadowOf(popupWindow).getXOffset(), 56);
      assertEquals(shadowOf(popupWindow).getYOffset(), 69);
    } 
 
    @Test 
    public void supportsViewConstructor() throws Exception { 
      PopupWindow popupWindow = new PopupWindow(contentView);
      popupWindow.showAsDropDown(anchor);
      assertNotNull(shadowWindowManager.getViews().get(0).findViewById(R.id.content_view));
    } 
 
    @Test 
    public void backgroundDrawableIsBehindPopupViewContainer() throws Exception { 
      PopupWindow popupWindow = new PopupWindow(contentView);