@Override
 public void transitionTo(int mode, boolean animate) {
   mRequestedMode = mode;
   if (mVertical && mode == MODE_TRANSLUCENT) {
     // translucent mode not allowed when vertical
     mode = MODE_OPAQUE;
   }
   super.transitionTo(mode, animate);
 }
 @Override
 protected void onTransition(int oldMode, int newMode, boolean animate) {
   super.onTransition(oldMode, newMode, animate);
   applyMode(newMode, animate);
 }