Code example for ImageButton

Methods: setImageResource, setOnClickListener, setTag

0
a.recycle();
    } 
 
    public void setHomeAction(Action action) {
        mHomeBtn.setOnClickListener(this);
        mHomeBtn.setTag(action);
        mHomeBtn.setImageResource(action.getDrawable());
        mHomeLayout.setVisibility(View.VISIBLE);
    } 
 
    public void clearHomeAction() { 
        mHomeLayout.setVisibility(View.GONE);
    } 
 
    /** 
     * Shows the provided logo to the left in the action bar. 
     * 
     * This is meant to be used instead of the setHomeAction and does not draw 
     * a divider to the left of the provided logo. 
     *