예제 #1
0
 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);
 }
예제 #2
0
 @Override
 public boolean hasFocus() {
   for (ActionButton button : myButtons) {
     if (button.hasFocus()) {
       return true;
     }
   }
   return false;
 }
예제 #3
0
  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);
  }