本文整理了Java中android.graphics.drawable.Drawable.onBoundsChange()
方法的一些代码示例,展示了Drawable.onBoundsChange()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawable.onBoundsChange()
方法的具体详情如下:
包路径:android.graphics.drawable.Drawable
类名称:Drawable
方法名:onBoundsChange
暂无
代码示例来源:origin: bumptech/glide
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
applyGravity = true;
}
代码示例来源:origin: chentao0707/SimplifyReader
@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;
}
代码示例来源:origin: seven332/EhViewer
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
textSizeDirty = true;
}
代码示例来源:origin: seven332/EhViewer
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
mRectF.set(bounds);
}
代码示例来源:origin: nostra13/Android-Universal-Image-Loader
@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);
}
代码示例来源:origin: robolectric/robolectric
@Override protected void onBoundsChange(Rect bounds) {
boundsChanged = true;
super.onBoundsChange(bounds);
}
}
代码示例来源:origin: seven332/EhViewer
@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();
}
代码示例来源:origin: nostra13/Android-Universal-Image-Loader
@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);
}
代码示例来源:origin: ybq/Android-SpinKit
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
setDrawBounds(bounds);
}
代码示例来源:origin: vinc3m1/RoundedImageView
@Override
protected void onBoundsChange(@NonNull Rect bounds) {
super.onBoundsChange(bounds);
mBounds.set(bounds);
updateShaderMatrix();
}
代码示例来源:origin: mikepenz/Android-Iconics
@Override
protected void onBoundsChange(@NonNull Rect bounds) {
offsetIcon(bounds);
try {
mPath.close();
} catch (Exception ignored) {
}
super.onBoundsChange(bounds);
}
代码示例来源:origin: dinuscxj/LoadingDrawable
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
this.mLoadingRender.setBounds(bounds);
}
代码示例来源:origin: qiujuer/Genius-Android
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
initPath(bounds);
}
代码示例来源:origin: jdsjlzx/LRecyclerView
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
setDrawBounds(bounds);
}
代码示例来源:origin: rey5137/material
@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();
}
代码示例来源:origin: tarek360/RichPath
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
if (bounds.width() > 0 && bounds.height() > 0) {
width = bounds.width();
height = bounds.height();
mapPaths();
}
}
代码示例来源:origin: facebook/litho
@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();
}
代码示例来源:origin: Hitomis/ActivitySwitcher
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
mDirty = true;
}
代码示例来源:origin: ukanth/afwall
@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();
}
代码示例来源:origin: dongjunkun/GanK
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
setDrawBounds(bounds);
}
内容来源于网络,如有侵权,请联系作者删除!