@Override public void setInsets(final InputMethodService.Insets insets) { final int visibleTopInsets = insets.visibleTopInsets; if (mLastVisibleTopInsets != visibleTopInsets) { mLastVisibleTopInsets = visibleTopInsets; mView.invalidateOutline(); } }
@Override public void onClick(View view) { mClickCount++; // Update the text in the TextView changeText(); // Invalidate the outline just in case the TextView changed size clippedView.invalidateOutline(); } });
@Override public void onAnimationUpdate(ValueAnimator arg0) { float progress = (Float) arg0.getAnimatedValue(); setProgress(progress); revealView.invalidateOutline(); if (!Utilities.ATLEAST_LOLLIPOP_MR1) { revealView.invalidate(); } } });
@Override public void onAnimationUpdate(ValueAnimator arg0) { float progress = (Float) arg0.getAnimatedValue(); setProgress(progress); revealView.invalidateOutline(); if (!Utilities.ATLEAST_LOLLIPOP_MR1) { revealView.invalidate(); } } });
@Override public void onAnimationUpdate(ValueAnimator arg0) { float progress = (Float) arg0.getAnimatedValue(); setProgress(progress); revealView.invalidateOutline(); if (!AndroidVersion.isAtLeastLollipopMR1) { revealView.invalidate(); } } });
public void setFakeShadowTranslationZ(float fakeShadowTranslationZ, float outlineAlpha, int shadowYEnd, int outlineTranslation) { if (fakeShadowTranslationZ == 0.0f) { mFakeShadow.setVisibility(INVISIBLE); } else { mFakeShadow.setVisibility(VISIBLE); fakeShadowTranslationZ = Math.max(mShadowMinHeight, fakeShadowTranslationZ); mFakeShadow.setTranslationZ(fakeShadowTranslationZ); mFakeShadow.setTranslationX(outlineTranslation); mFakeShadow.setTranslationY(shadowYEnd - mFakeShadow.getHeight()); if (outlineAlpha != mOutlineAlpha) { mOutlineAlpha = outlineAlpha; mFakeShadow.invalidateOutline(); } } } }
@Override public void onAnimationUpdate(ValueAnimator arg0) { float progress = arg0.getAnimatedFraction(); outlineProvider.setProgress(progress); revealView.invalidateOutline(); if (!Utilities.ATLEAST_LOLLIPOP_MR1) { revealView.invalidate(); } } });
@Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { int mGridHeight = qsHooks.getGridHeight(); if (mGridHeight == 0) return; View view = (View) param.thisObject; float height = view.getHeight(); height += (int) (mGridHeight * mExpansion); mClipBounds.set(view.getPaddingLeft(), 0, view.getWidth() - view.getPaddingRight(), (int) height); view.setClipBounds(mClipBounds); view.invalidateOutline(); } };
public LiveThemeManager(Activity activity) { mActivity = activity; if (activity instanceof AppCompatActivity) addColorProperty(R.attr.colorPrimary, (c) -> { ((AppCompatActivity) activity).getSupportActionBar().setBackgroundDrawable( new ColorDrawable(c)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && activity.findViewById(R.id.action_bar_container) != null) activity.findViewById(R.id.action_bar_container).invalidateOutline(); }); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) addColorProperty(R.attr.colorPrimaryDark, (c) -> activity.getWindow().setStatusBarColor(c)); addColorProperty(android.R.attr.colorBackground, (c) -> activity.getWindow().setBackgroundDrawable(new ColorDrawable(c))); }