コード例 #1
0
 public void hideOverflow() {
   if (mOverlayManager == null) {
     throw new RuntimeException("You have to set the OverlayManager to use the ActionBarOverflow");
   }
   View overflowRoot = mOverlayManager.findViewById(R.id.root_overflow_menu);
   if (overflowRoot.getVisibility() == View.VISIBLE)
     mOverlayManager.hideView(overflowRoot, R.anim.scale_out);
 }
コード例 #2
0
 // OVERFLOW
 public void toggleOverflow() {
   if (mOverlayManager == null) {
     throw new RuntimeException("You have to set the OverlayManager to use the ActionBarOverflow");
   } else if (mOverflow.hasCustomViews() || mOverflow.hasActionBarButtons()) {
     mOverlayManager.toggleViewById(R.id.root_overflow_menu, R.anim.scale_in, R.anim.scale_out);
   }
 }
コード例 #3
0
 // OVERLAY MANAGER
 public ActionBarView setOverlayManager(OverlayManager om) {
   mOverlayManager = om;
   om.addView(
       mOverflow, new AnimationParams(FillType.CLIP_CONTENT).exclusivity(Exclusivity.EXCLUDE_ALL));
   return this;
 }