@Override public void setAlpha(int i) { wrapped.setAlpha(i); }
@Override public void setAlpha(int alpha) { mAlpha = alpha; if(mBackgroundDrawable != null) mBackgroundDrawable.setAlpha(alpha); }
public static void setAlpha(Drawable drawable, float value) { final int scaledValue = (int) (value * 255); drawable.setAlpha(scaledValue); } }
@Override public void setAlpha(int alpha) { if (mDrawable == null) { return; } mDrawable.setAlpha(alpha); }
@Override public void setAlpha(int alpha) { if(mDrawable != null) mDrawable.setAlpha(alpha); }
@Override public void setAlpha(int alpha) { mDrawable.setAlpha(alpha); }
@Override public void setAlpha(int alpha) { mDrawable.setAlpha(alpha); }
@Override public void onMoving(boolean isDragging, float percent, int offset, int height, int maxDragHeight) { if (mState != RefreshState.Refreshing) { mBoxDrawable.setAlpha((int) (255 * (1f - Math.max(0, percent - 1)))); } }
@Override public void setAlpha(int alpha) { if (mDrawable != null) { mDrawable.setAlpha(alpha); } }
@Override public void onStartAnimator(@NonNull RefreshLayout layout, int height, int maxDragHeight) { mState = RefreshState.Refreshing; mBoxDrawable.setAlpha(255); final View thisView = this; thisView.invalidate(); }
@Override public void onAnimationUpdate(ValueAnimator animation) { int value = (Integer) animation.getAnimatedValue(); mBackgroundDrawable.setAlpha(value); } });
@Override public void onAnimationUpdate(ValueAnimator animation) { int value = (Integer) animation.getAnimatedValue(); mBackgroundDrawable.setAlpha(value); } });
Drawable drawable = menuItem.getIcon(); if (drawable != null) { // If we don't mutate the drawable, then all drawable's with this id will have a color // filter applied to it. drawable.mutate(); drawable.setColorFilter(color, PorterDuff.Mode.SRC_ATOP); drawable.setAlpha(alpha); }
@Override public void setAlpha(int alpha) { this.alpha = alpha; if (placeholder != null) { placeholder.setAlpha(alpha); } super.setAlpha(alpha); }
@Override public Animator onAppear(ViewGroup sceneRoot, View view, TransitionValues startValues, TransitionValues endValues) { if (view == null || view.getBackground() == null) return null; Drawable background = view.getBackground(); background.setAlpha(0); return ObjectAnimator.ofInt(background, ViewUtils.DRAWABLE_ALPHA, 0, 255); }
LinearLayout layout = (LinearLayout) findViewById(R.id.your_id); Drawable d = getResources().getDrawable(R.relevant_drawable); d.setAlpha(50); layout.setBackgroundDrawable(d);
@Implementation protected void setAlpha(int alpha) { this.alpha = alpha; Shadow.directlyOn(realDrawable, Drawable.class).setAlpha(alpha); }
private void setColorViewAlpha(int targetAlpha) { mCircleView.getBackground().setAlpha(targetAlpha); mProgress.setAlpha(targetAlpha); }
public void stopAnimation() { mRunning = false; mPrevIcon.setCallback(null); unscheduleDrawable(mPrevIcon); mPrevIcon = null; mIcon.setAlpha(255); if(getHandler() != null) getHandler().removeCallbacks(this); invalidate(); }