本文整理了Java中android.widget.PopupMenu.setOnDismissListener()
方法的一些代码示例,展示了PopupMenu.setOnDismissListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PopupMenu.setOnDismissListener()
方法的具体详情如下:
包路径:android.widget.PopupMenu
类名称:PopupMenu
方法名:setOnDismissListener
暂无
代码示例来源:origin: TeamNewPipe/NewPipe
public void buildQualityMenu() {
if (qualityPopupMenu == null) return;
qualityPopupMenu.getMenu().removeGroup(qualityPopupMenuGroupId);
for (int i = 0; i < availableStreams.size(); i++) {
VideoStream videoStream = availableStreams.get(i);
qualityPopupMenu.getMenu().add(qualityPopupMenuGroupId, i, Menu.NONE,
MediaFormat.getNameById(videoStream.getFormatId()) + " " + videoStream.resolution);
}
if (getSelectedVideoStream() != null) {
qualityTextView.setText(getSelectedVideoStream().resolution);
}
qualityPopupMenu.setOnMenuItemClickListener(this);
qualityPopupMenu.setOnDismissListener(this);
}
代码示例来源:origin: TeamNewPipe/NewPipe
private void buildPlaybackSpeedMenu() {
if (playbackSpeedPopupMenu == null) return;
playbackSpeedPopupMenu.getMenu().removeGroup(playbackSpeedPopupMenuGroupId);
for (int i = 0; i < PLAYBACK_SPEEDS.length; i++) {
playbackSpeedPopupMenu.getMenu().add(playbackSpeedPopupMenuGroupId, i, Menu.NONE, formatSpeed(PLAYBACK_SPEEDS[i]));
}
playbackSpeedTextView.setText(formatSpeed(getPlaybackSpeed()));
playbackSpeedPopupMenu.setOnMenuItemClickListener(this);
playbackSpeedPopupMenu.setOnDismissListener(this);
}
代码示例来源:origin: TeamNewPipe/NewPipe
});
captionPopupMenu.setOnDismissListener(this);
代码示例来源:origin: grzegorznittner/chanu
protected void showMetaOverflowMenuAsync(final PopupMenu popup, String boardCode) {
final ChanBoard favoritesBoard = ChanFileStorage.loadBoardData(BoardActivity.this, ChanBoard.FAVORITES_BOARD_CODE);
final ChanThread thread = ChanBoard.makeFavoritesThread(BoardActivity.this, boardCode);
final boolean favorited = ChanFileStorage.isFavoriteBoard(favoritesBoard, thread);
if (DEBUG) Log.i(TAG, "setMetaOverflowMenuAsync() /" + boardCode + "/ favorited=" + favorited
+ " handler=" + handler + " menu=" + popup.getMenu());
if (handler != null)
handler.post(new Runnable() {
@Override
public void run() {
Menu menu = popup.getMenu();
if (menu == null)
return;
if (menu == null)
return;
MenuItem item;
if ((item = menu.findItem(R.id.board_add_to_favorites_menu)) != null)
item.setVisible(!favorited);
if ((item = menu.findItem(R.id.favorites_remove_board_menu)) != null)
item.setVisible(favorited);
popup.setOnMenuItemClickListener(popupListener);
popup.setOnDismissListener(popupDismissListener);
popup.show();
}
});
}
代码示例来源:origin: mooshim/Mooshimeter-AndroidApp
rval.setOnDismissListener(new PopupMenu.OnDismissListener() {
@Override
public void onDismiss(PopupMenu popupMenu) {
代码示例来源:origin: grzegorznittner/chanu
popup.inflate(menuId);
popup.setOnMenuItemClickListener(popupListener);
popup.setOnDismissListener(popupDismissListener);
MenuItem shareItem = popup.getMenu().findItem(R.id.thread_context_share_action_menu);
内容来源于网络,如有侵权,请联系作者删除!