Code example for ImageButton

Methods: setVisibility

0
 
    public void setType(Type type) {
        if (type == Type.PRIVATE) {
            likeButton.setVisibility(View.GONE);
        } else if (type == Type.PUBLIC) {
            likeButton.setVisibility(View.VISIBLE);
        } 
    } 
 
    public void setLikeListener(OnClickListener listener) {
        likeButton.setOnClickListener(listener);
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE