android.widget.PopupMenu.dismiss()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中android.widget.PopupMenu.dismiss()方法的一些代码示例,展示了PopupMenu.dismiss()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PopupMenu.dismiss()方法的具体详情如下:
包路径:android.widget.PopupMenu
类名称:PopupMenu
方法名:dismiss

PopupMenu.dismiss介绍

暂无

代码示例

代码示例来源:origin: robolectric/robolectric

@Implementation
protected void dismiss() {
 this.isShowing = false;
 directlyOn(realPopupMenu, PopupMenu.class).dismiss();
}

代码示例来源:origin: TeamNewPipe/NewPipe

@Override
public void onViewRecycled(@NonNull ViewHolder view) {
  super.onViewRecycled(view);
  if (view instanceof ViewHolderHeader) return;
  ViewHolderItem h = (ViewHolderItem) view;
  if (h.item.mission instanceof DownloadMission) {
    mPendingDownloadsItems.remove(h);
    if (mPendingDownloadsItems.size() < 1) setAutoRefresh(false);
  }
  h.popupMenu.dismiss();
  h.item = null;
  h.lastTimeStamp = -1;
  h.lastDone = -1;
  h.lastCurrent = -1;
  h.state = 0;
}

代码示例来源:origin: TeamNewPipe/NewPipe

@Override
public void onConfigurationChanged(Configuration newConfig) {
  super.onConfigurationChanged(newConfig);
  if (playerImpl.isSomePopupMenuVisible()) {
    playerImpl.getQualityPopupMenu().dismiss();
    playerImpl.getPlaybackSpeedPopupMenu().dismiss();
  }
}

代码示例来源:origin: robolectric/robolectric

@Test
public void testIsShowing_returnsFalseIfShownThenDismissed() throws Exception {
 popupMenu.show();
 popupMenu.dismiss();
 assertThat(shadowPopupMenu.isShowing()).isFalse();
}

代码示例来源:origin: mooshim/Mooshimeter-AndroidApp

@Override
  public boolean onMenuItemClick(MenuItem menuItem) {
    final int choice = menuItem.getItemId();
    rval.dismiss();
    Util.dispatch(new Runnable() {
      @Override
      public void run() {
        cb.onReceived(getUTCTime(), choice);
      }
    });
    return false;
  }
});

代码示例来源:origin: org.robolectric/shadows-core

@Implementation
public void dismiss() {
 this.isShowing = false;
 directlyOn(realPopupMenu, PopupMenu.class).dismiss();
}

代码示例来源:origin: org.robolectric/shadows-core-v23

@Implementation
public void dismiss() {
 this.isShowing = false;
 directlyOn(realPopupMenu, PopupMenu.class).dismiss();
}

代码示例来源:origin: org.robolectric/framework

@Implementation
public void dismiss() {
 this.isShowing = false;
 directlyOn(realPopupMenu, PopupMenu.class).dismiss();
}

代码示例来源:origin: org.robolectric/shadows-framework

@Implementation
protected void dismiss() {
 this.isShowing = false;
 directlyOn(realPopupMenu, PopupMenu.class).dismiss();
}

相关文章