Sets the drawable in an image view, makes sure the view is only visible if there
is a drawable.
480687
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.
        v.setImageDrawable(drawable);

        if (drawable == null) {
            v.setVisibility(nullVisibility);
        } else {
            v.setVisibility(View.VISIBLE);

            // This is a hack to get any animated drawables (like a 'working' spinner)
            // to animate. You have to setVisible true on an AnimationDrawable to get
            // it to start animating, but it must first have been false or else the
            // call to setVisible will be ineffective. We need to clear up the story
            // about animated drawables in the future, see http://b/1878430.
            drawable.setVisible(false, false);
            drawable.setVisible(true, false);
        }
    }
989603
public void setAlarmsVisible(final boolean VISIBLE) {
        if (null == alarmsVisible) {
            _alarmsVisible = VISIBLE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            alarmsVisible.set(VISIBLE);
        }
    }
727702
private void setChildDrawableAtIndex(int index, @Nullable Drawable drawable) {
    if (drawable == null) {
      mFadeDrawable.setDrawable(index, null);
      return;
    }
    drawable = WrappingUtils.maybeApplyLeafRounding(drawable, mRoundingParams, mResources);
    getParentDrawableAtIndex(index).setDrawable(drawable);
  }
1374204
public DrawerItem setImage(Drawable image, int imageMode) {
        mImage = image;
        setImageMode(imageMode);
        notifyDataChanged();
        return this;
    }
1078615
protected void setSizeVisible(boolean visible) {

        Style style = m_sizeLabel.getElement().getParentElement().getStyle();
        if (visible) {
            style.clearDisplay();
        } else {
            style.setDisplay(Display.NONE);
        }
    }
1284603
public static void setVisible(HTMLElement element, boolean visible) {
        if (element != null) {
            element.style.display = visible ? "" : "none";
        }
    }
94139
public void setSlideDrawable(Drawable drawable) {
        mSlideDrawable = new SlideDrawable(drawable);
        mSlideDrawable.setIsRtl(ViewHelper.getLayoutDirection(this) == LAYOUT_DIRECTION_RTL);

        if (mActionBarHelper != null) {
            mActionBarHelper.setDisplayShowHomeAsUpEnabled(true);

            if (mDrawerIndicatorEnabled) {
                mActionBarHelper.setActionBarUpIndicator(mSlideDrawable,
                        isMenuVisible() ? mDrawerOpenContentDesc : mDrawerClosedContentDesc);
            }
        }
    }
1301685
public static void setDrawableProperties(
      @Nullable Drawable drawable, @Nullable DrawableProperties properties) {
    if (drawable == null || properties == null) {
      return;
    }
    properties.applyTo(drawable);
  }
901367
public void setAverageVisible(final boolean VISIBLE) {
        if (null == averageVisible) {
            _averageVisible = VISIBLE;
            fireUpdateEvent(VISIBILITY_EVENT);
        } else {
            averageVisible.set(VISIBLE);
        }
    }
1071889
public void setFooterDivider(Drawable drawable) {
        mFooterDivider = drawable;
        if (drawable != null) {
            mFooterDividerHeight = drawable.getIntrinsicHeight();
        } else {
            mFooterDividerHeight = 0;
        }
        mContentView.setWillNotDraw(drawable == null);
        mContentView.invalidate();
    }
1106380
public void setPageMarginDrawable(Drawable d) {
        mMarginDrawable = d;
        if (d != null) refreshDrawableState();
        setWillNotDraw(d == null);
        invalidate();
    }
1359885
public boolean setDrawableByLayerId(int id, Drawable drawable) {
        final int index = findIndexByLayerId(id);
        if (index < 0) {
            return false;
        }

        setDrawable(index, drawable);
        return true;
    }
680703
private void adaptPreviewView() {
        if (previewView != null) {
            if (isPreviewShown()) {
                previewView.setVisibility(View.VISIBLE);
                previewView.setLayoutParams(createPreviewLayoutParams());
                previewLoader.load(getColor(), previewView);
            } else {
                previewView.setVisibility(View.INVISIBLE);
                previewView.setImageBitmap(null);
            }
        }
    }
1043603
public void setPromptView(View prompt) {
        boolean showing = isShowing();
        if (showing) {
            removePromptView();
        }
        mPromptView = prompt;
        if (showing) {
            show();
        }
    }
64625
protected void setZoomVisible(boolean visible) {

        Style style = m_zoomLabel.getElement().getParentElement().getStyle();
        if (visible) {
            style.clearDisplay();
        } else {
            style.setDisplay(Display.NONE);
        }
    }
1349886
public void setPreviewVisible(boolean visible) {

        m_previewVisible = visible;
        if (m_previewVisible) {
            useMaxDimensions();
            m_previewVisibility.setValue(I_CmsLayoutBundle.INSTANCE.previewDialogCss().previewVisible());
            if (m_galleryHandler instanceof CmsGalleryPopup) {
                ((CmsGalleryPopup)m_galleryHandler).center();
            }
        } else {
            m_previewVisibility.setValue(I_CmsLayoutBundle.INSTANCE.previewDialogCss().hidePreview());
            updateSizes();
        }
    }
755483
public void setTouchDrawable(TouchEffectDrawable touchDrawable) {
        if (mTouchDrawable != touchDrawable) {
            if (mTouchDrawable != null) {
                mTouchDrawable.setCallback(null);
            }
            if (touchDrawable != null) {
                touchDrawable.setCallback(this);
                // We must set layer type is View.LAYER_TYPE_SOFTWARE,
                // to support Canvas.clipPath()
                // on Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
                if (getLayerType() != View.LAYER_TYPE_SOFTWARE)
                    setLayerType(View.LAYER_TYPE_SOFTWARE, null);
            }
            mTouchDrawable = touchDrawable;
        }
    }