Code example for ImageButton

Methods: setFocusable, setVisibility

0
    public void setArtist(Artist artist) {
    	this.artist = artist;
         
        titleView.setText(artist.getName());
         
        starButton.setVisibility((Util.isOffline(getContext()) || !artist.isStarred()) ? View.GONE : View.VISIBLE);
		starButton.setFocusable(false);
		 
		update(); 
    } 
	 
	@Override 
	protected void update() { 
		starButton.setVisibility((Util.isOffline(getContext()) || !artist.isStarred()) ? View.GONE : View.VISIBLE);
		File file = FileUtil.getArtistDirectory(context, artist);
		if(file.exists()) {
			moreButton.setImageResource(R.drawable.list_item_more_shaded);
		} else { 
			moreButton.setImageResource(R.drawable.list_item_more);
		} 
    }