Example #1
0
  /**
   * Set the Action for the right action button
   *
   * @param action
   */
  public void setRightAction(Action action) {

    mRightButton.setOnClickListener(this);
    mRightButton.setTag(action);
    mRightButton.setImageResource(action.getDrawable());

    mRightButton.setVisibility(View.VISIBLE);
  }
Example #2
0
  /**
   * Inflates a {@link View} with the given {@link Action}.
   *
   * @param action the action to inflate
   * @return a view
   */
  private View inflateAction(Action action) {
    View view = mInflater.inflate(R.layout.actionbar_item, mActionsView, false);

    ImageButton labelView = (ImageButton) view.findViewById(R.id.actionbar_item);
    labelView.setImageResource(action.getDrawable());

    view.setTag(action);
    view.setOnClickListener(this);
    return view;
  }
Example #3
0
 public void setHomeAction(Action action) {
   mHomeBtn.setOnClickListener(this);
   mHomeBtn.setTag(action);
   mHomeBtn.setImageResource(action.getDrawable());
   mHomeLayout.setVisibility(View.VISIBLE);
 }