@Override public void invalidate() { if (mSuppressInvalidations) { mWasInvalidatedWhileSuppressed = true; return; } super.invalidate(); }
@Override public void invalidate(int l, int t, int r, int b) { if (mSuppressInvalidations) { mWasInvalidatedWhileSuppressed = true; return; } super.invalidate(l, t, r, b); }
ViewGroup vg = findViewById (R.id.mainLayout); vg.invalidate();
@Override public void invalidate(Rect dirty) { if (mSuppressInvalidations) { mWasInvalidatedWhileSuppressed = true; return; } super.invalidate(dirty); }
break; _root.invalidate(); return true; }}
private void hideViewWhenNotCanceled() { if (!mCanceled) { if (mIsForcedVisibility) { mView.setTag(R.id.transitionAlpha, mView.getAlpha()); mView.setAlpha(0); } else if (!mFinalVisibilitySet) { // Recreate the parent's display list in case it includes mView. ViewUtils.setTransitionVisibility(mView, mFinalVisibility); if (mParent != null) { mParent.invalidate(); } mFinalVisibilitySet = true; } } // Layout is allowed now that the View is in its final state suppressLayout(false); }
try{ ((SuperActivityToast) superToast).getViewGroup().removeView(superToast.getView()); ((SuperActivityToast) superToast).getViewGroup().invalidate(); } catch (NullPointerException|IllegalStateException exception) { Log.e(getClass().getName(), exception.toString());
/** * Clear the animation garbage of the target view. */ private static void clearClippedChildren(ViewGroup viewGroup) { viewGroup.setClipChildren(true); viewGroup.invalidate(); viewGroup.setClipChildren(false); }
@Override public void run() { if(getInnerView()==null){ return; } if(mOrientation== Constants.Orientation.VERTICAL){ ((WXScrollView) getInnerView()).smoothScrollBy(0, y); }else{ ((WXHorizontalScrollView)getInnerView()).smoothScrollBy(x,0); } getInnerView().invalidate(); } }, 16);
private static void updateSrcDrawing() { mBackgroundPaint.setXfermode(mDrawBackgroundAsSrc && (!mFadingOut && !mParentFadingOut) ? mSrcMode : null); mStackScrollLayout.invalidate(); }
ViewGroup owner = (ViewGroup) lastImageSelected.getParent(); int x = owner.getChildCount(); for(int i=0; i<=x; i++) { View currentChild = owner.getChildAt(0);//<---- just change i to 0 if (currentChild != mainImage && currentChild != zoomIn && currentChild != zoomOut && currentChild != rotatePoint) { owner.removeView(currentChild); owner.invalidate(); } }
ViewGroup owner = (ViewGroup) lastImageSelected.getParent(); int x = owner.getChildCount(); for(int i=0; i<=x; i++) { View currentChild = owner.getChildAt(i); if (currentChild != mainImage && currentChild != zoomIn && currentChild != zoomOut && currentChild != rotatePoint) { owner.removeView(currentChild); } } owner.invalidate();
public void addProgressBar(Activity activity){ final ViewGroup rootFrameLayout = (ViewGroup) activity.getWindow().peekDecorView(); final ViewGroup modal = new RelativeLayout(activity); ProgressBar progressBar = new ProgressBar(activity); LayoutParams layoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT); modal.addView(progressBar, layoutParams); rootFrameLayout.addView(modal, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); rootFrameLayout.invalidate(); }
private void applyCurrentBackgroundBounds() { if (!mFadingOut) { ScrimHelper.setExcludedBackgroundArea(mCurrentBounds); } mStackScrollLayout.invalidate(); }
@Override public void invalidate() { super.invalidate(); mContentsView.invalidate(); }
public void removeColumn(int index){ BoardItem item = (BoardItem)((ViewGroup)((ViewGroup)boardView.getChildAt(0)).getChildAt(0)).getChildAt(index); ViewGroup group = ((ViewGroup) item.getParent()); ((ViewGroup)item.getParent()).removeView(item); columns.remove(index); group.invalidate(); }
button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // row is your row, the parent of the clicked button View row = (View) v.getParent(); // container contains all the rows, you could keep a variable somewhere else to the container which you can refer to here ViewGroup container = ((ViewGroup)row.getParent()); // delete the row and invalidate your view so it gets redrawn container.removeView(row); container.invalidate(); } });
protected void removeAdView(View topView, int adViewId) { View adView = topView.findViewById(adViewId); if (adView != null) { ViewGroup parent = (ViewGroup) adView.getParent(); parent.removeView(adView); parent.invalidate(); } }
/** * Set the color for the statusBar * * @param statusBarColor */ public void setStatusBarColor(int statusBarColor) { if (mBuilder.mScrimInsetsLayout != null) { mBuilder.mScrimInsetsLayout.setInsetForeground(statusBarColor); mBuilder.mScrimInsetsLayout.getView().invalidate(); } }
/** * Set the color for the statusBar * * @param statusBarColor */ public void setStatusBarColor(@ColorInt int statusBarColor) { if (mDrawerBuilder.mMaterialize != null) { mDrawerBuilder.mMaterialize.setStatusBarColor(statusBarColor); mDrawerBuilder.mMaterialize.getScrimInsetsFrameLayout().getView().invalidate(); } }