コード例 #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);
  }