@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); applyGravity = true; }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); fBounds.left = bounds.left + mBorderWidth / 2f + .5f; fBounds.right = bounds.right - mBorderWidth / 2f - .5f; fBounds.top = bounds.top + mBorderWidth / 2f + .5f; fBounds.bottom = bounds.bottom - mBorderWidth / 2f - .5f; }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); textSizeDirty = true; }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); mRectF.set(bounds); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); mRect.set(0, 0, bounds.width(), bounds.height()); radius = Math.min(bounds.width(), bounds.height()) / 2; strokeRadius = radius - strokeWidth / 2; // Resize the original bitmap to fit the new bound Matrix shaderMatrix = new Matrix(); shaderMatrix.setRectToRect(mBitmapRect, mRect, Matrix.ScaleToFit.FILL); bitmapShader.setLocalMatrix(shaderMatrix); }
@Override protected void onBoundsChange(Rect bounds) { boundsChanged = true; super.onBoundsChange(bounds); } }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); mPath.reset(); mPath.moveTo(bounds.left, bounds.top); mPath.lineTo(bounds.right, bounds.top); mPath.lineTo(bounds.right, bounds.bottom); mPath.close(); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); mRect.set(margin, margin, bounds.width() - margin, bounds.height() - margin); // Resize the original bitmap to fit the new bound Matrix shaderMatrix = new Matrix(); shaderMatrix.setRectToRect(mBitmapRect, mRect, Matrix.ScaleToFit.FILL); bitmapShader.setLocalMatrix(shaderMatrix); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); setDrawBounds(bounds); }
@Override protected void onBoundsChange(@NonNull Rect bounds) { super.onBoundsChange(bounds); mBounds.set(bounds); updateShaderMatrix(); }
@Override protected void onBoundsChange(@NonNull Rect bounds) { offsetIcon(bounds); try { mPath.close(); } catch (Exception ignored) { } super.onBoundsChange(bounds); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); this.mLoadingRender.setBounds(bounds); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); initPath(bounds); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); setDrawBounds(bounds); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); if(mWidth > 0 && mHeight > 0){ mDrawBound.left = bounds.left + (bounds.width() - mWidth) / 2f; mDrawBound.top = bounds.top + (bounds.height() - mHeight) / 2f; mDrawBound.right = mDrawBound.left + mWidth; mDrawBound.bottom = mDrawBound.top + mHeight; } else { mDrawBound.left = bounds.left + mPaddingLeft; mDrawBound.top = bounds.top + mPaddingTop; mDrawBound.right = bounds.right - mPaddingRight; mDrawBound.bottom = bounds.bottom - mPaddingBottom; } updatePath(); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); if (bounds.width() > 0 && bounds.height() > 0) { width = bounds.width(); height = bounds.height(); mapPaths(); } }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); final int cx = bounds.centerX(); final int cy = bounds.centerY(); // Setup points mP1.set(cx - mWidth, cy - mHeight); mP2.set(cx + mWidth, cy - mHeight); mP3.set(cx, cy + mHeight); // Setup triangle mTrianglePath.reset(); mTrianglePath.setFillType(Path.FillType.EVEN_ODD); mTrianglePath.moveTo(mP1.x, mP1.y); mTrianglePath.lineTo(mP2.x, mP2.y); mTrianglePath.lineTo(mP3.x, mP3.y); mTrianglePath.close(); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); mDirty = true; }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); int height = bounds.height(); int width = bounds.width(); numRectanglesHorizontal = (int) Math.ceil((width / mRectangleSize)); numRectanglesVertical = (int) Math.ceil(height / mRectangleSize); generatePatternBitmap(); }
@Override protected void onBoundsChange(Rect bounds) { super.onBoundsChange(bounds); setDrawBounds(bounds); }