public void addButton(String actionId, boolean isCloseButton, int imageId) {
   final ActionButton button = new ActionButton(getContext(), actionId, isCloseButton);
   button.setImageResource(imageId);
   button.setOnClickListener(this);
   myPlateLayout.addView(button);
   myButtons.add(button);
 }
 @Override
 public boolean hasFocus() {
   for (ActionButton button : myButtons) {
     if (button.hasFocus()) {
       return true;
     }
   }
   return false;
 }
  public void updateStates() {

    final ZLApplication application = ZLApplication.Instance();
    for (ActionButton button : myButtons) {
      button.setEnabled(application.isActionEnabled(button.ActionId));
    }
    Message msg =
        ReaderActivity.instance.handler.obtainMessage(ReaderActivity.MSG_PANEL_MENU_UPDATE);
    ReaderActivity.instance.handler.sendMessage(msg);
  }