public void ShowL2Menu() {
   MG.setFocusable(true);
   MG.requestFocus();
   MG.initFocusID();
   MG.invalidate();
   MG.showFirstSelectFrame();
 }
  public MenuUIOp(Menucontrol menucontrol, String entrance) {
    mControl = menucontrol;
    getMGroupBGKind(entrance);
    MG = new MenuGroup1(mControl.getContext(), null, MGroupBGKind);
    MG.setMenuGroupListener(mControl);

    AbsoluteLayout.LayoutParams paramp;
    if (MGroupBGKind == MenuGroup.nobar_player || MGroupBGKind == MenuGroup.bar_player)
      paramp =
          new AbsoluteLayout.LayoutParams(
              (int) (1920 * Resolution.getScaleX()),
              (int) (238 * Resolution.getScaleY()),
              0,
              (int) Math.ceil((1080 - 238) * Resolution.getScaleY()));
    else
      paramp =
          new AbsoluteLayout.LayoutParams(
              (int) (1920 * Resolution.getScaleX()),
              (int) (152 * Resolution.getScaleY()),
              0,
              (int) ((1080 - 152) * Resolution.getScaleY()));
    MG.setLayoutParams(paramp);
    mControl.addView(MG);

    SF = new SelectFrame(mControl.getContext(), null);
    SF.setSelectFrameListener(mControl);
    SF.setFocusable(false);
    mControl.addView(SF);
  }
 public void RbalancerSmg() {
   if (balancer != null) {
     mControl.removeViewInLayout(balancer);
     balancer = null;
     MG.setFocusable(true);
     MG.requestFocus();
   }
 }
 public void setMGFocus(boolean focus) {
   if (null != MG) {
     MG.setFocusable(focus);
     if (focus) {
       MG.requestFocus();
     }
   }
 }
 public void RdialogSmg() {
   if (dialog != null) {
     mControl.removeViewInLayout(dialog);
     dialog = null;
     MG.setFocusable(true);
     MG.requestFocus();
   }
 }
 public void RpbvhideSmg() {
   if (pBV != null) {
     mControl.removeViewInLayout(pBV);
     pBV = null;
     MG.setFocusable(true);
     MG.requestFocus();
   }
 }
 public void RsfSmg() {
   if (SF.getVisibility() != View.INVISIBLE) {
     HideSelectFrame();
     // MG.initFocusID();
     MG.update();
     MG.setFocusable(true);
     MG.requestFocus();
   }
 }
 public void RpbvSmg() {
   if (pBV != null) {
     mControl.removeViewInLayout(pBV);
     pBV = null;
     mControl.addView(MG);
     MG.setFocusable(true);
     MG.requestFocus();
     MG.myinvalidate();
   }
 }
 public void setSFFocus() {
   if (SF != null) {
     SF.setmyFocus();
     MG.setFocusable(false);
     SF.setFocusable(true);
     SF.requestFocus();
   }
 }
  public void showDialog() {
    MG.setFocusable(false);
    AbsoluteLayout.LayoutParams paramp =
        new AbsoluteLayout.LayoutParams(702, 480, (1920 - 702) / 2, 250);
    dialog = new DialogView(mControl.getContext(), null);
    dialog.setLayoutParams(paramp);
    dialog.initDialogResource(mControl.xmlStringItem);
    dialog.setDialogListener(mControl);

    mControl.addView(dialog);
    dialog.setFocusable(true);
    dialog.requestFocus();
  }
  public void showBalancer(List<String> initBalancerPara) {
    MG.setFocusable(false);
    AbsoluteLayout.LayoutParams paramp =
        new AbsoluteLayout.LayoutParams(627, 376, (1920 - 627) / 2, 240);
    balancer = new Balancer(mControl.getContext(), null);
    balancer.setBalancerKeyListener(mControl);
    balancer.setLayoutParams(paramp);

    balancer.initBalancerRescource(mControl.xmlStringItem, initBalancerPara);
    mControl.addView(balancer, Resolution.getWidth(), Resolution.getHeight());

    balancer.setFocusable(true);
    balancer.requestFocus();
  }
 public void showProgressBar(String MenuItemName, String initnum) {
   if (pBV == null) {
     int offset = 0;
     if (MGroupBGKind == MenuGroup.noplayer) {
       offset = 152;
     } else {
       offset = 238;
     }
     MG.setFocusable(false);
     mControl.removeViewInLayout(MG);
     AbsoluteLayout.LayoutParams paramp =
         new AbsoluteLayout.LayoutParams(1920, offset, 0, 1080 - offset);
     pBV = new ProgressBarView(mControl.getContext(), null, MenuItemName, MGroupBGKind);
     pBV.setProgressBarListener(mControl);
     if (initnum != null && !initnum.equals("")) {
       pBV.setProgress(Integer.parseInt(initnum));
     }
     mControl.addView(pBV, paramp);
     pBV.requestFocus();
   }
 }
 public void BackToL1Menu(int FocusID) {
   MG.setFocusable(true);
   MG.requestFocus();
   MG.setFocusID(FocusID);
   MG.invalidate();
 }
 public void showMenu() {
   MG.initFocusID();
   MG.setFocusable(true);
   MG.requestFocus();
 }
 public void RsfSmg(int Key) {
   HideSelectFrame();
   MG.setFocusable(true);
   MG.requestFocus();
   MG.onKeyDown(Key, new KeyEvent(Key, Key));
 }