Code example for Drawable

Methods: setVisible

        return getDefaultIcon1(cursor);
    private Drawable getIcon2(Cursor cursor) {
        if (mIconName2Col == INVALID_INDEX) {
            return null; 
        String value = cursor.getString(mIconName2Col);
        return getDrawableFromResourceValue(value);
     * Sets the drawable in an image view, makes sure the view is only visible if there 
     * is a drawable. 
    private void setViewDrawable(ImageView v, Drawable drawable, int nullVisibility) {
        // Set the icon even if the drawable is null, since we need to clear any 
        // previous icon. 
Experience pair programming with AI  Get Codota for Java