/** Shows this floating toolbar. */ public FloatingToolbar show() { List<MenuItem> menuItems = getVisibleAndEnabledMenuItems(mMenu); if (!isCurrentlyShowing(menuItems) || mWidthChanged) { mPopup.dismiss(); mPopup.layoutMenuItems(menuItems, mMenuItemClickListener, mSuggestedWidth); mShowingTitles = getMenuItemTitles(menuItems); } refreshCoordinates(); mPopup.setOverflowDirection(mOverflowDirection); mPopup.updateCoordinates(mCoordinates.x, mCoordinates.y); if (!mPopup.isShowing()) { mPopup.show(mCoordinates.x, mCoordinates.y); } mWidthChanged = false; return this; }
/** Dismisses this floating toolbar. */ public void dismiss() { mPopup.dismiss(); }