/** * {@inheritDoc} */ @Override public boolean getShowBackground() { return mBackgroundDrawable.getShowBackground(); }
/** * Get whether the current drawable is showing a background. The default is {@code true}. * * @return Whether the current drawable is showing a background, or {@code false} if the * drawable does not implement {@link ShowBackgroundDrawable}. */ public boolean getShowProgressBackground() { Drawable drawable = getCurrentDrawable(); if (drawable instanceof ShowBackgroundDrawable) { return ((ShowBackgroundDrawable) drawable).getShowBackground(); } else { return false; } }
/** * {@inheritDoc} */ @Override public void setShowBackground(boolean show) { if (mBackgroundDrawable.getShowBackground() != show) { mBackgroundDrawable.setShowBackground(show); mSecondaryProgressDrawable.setShowBackground(!show); } }