INNER CODE UNIT · Java

onLayout

florent37/ShapeOfView · shapeofview/src/main/java/io/github/florent37/shapeofview/ShapeOfView.java:118

    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);
        if (changed) {
            requiresShapeUpdate();
        }
    }

    private boolean requiresBitmap() {
        return isInEditMode() || (clipManager != null && clipManager.requiresBitmap()) || drawable != null;
    }

    public void setDrawable(Drawable drawable) {
        this.drawable = drawable;
        requiresShapeUpdate();
    }

    public void setDrawable(int redId) {
        setDrawable(AppCompatResources.getDrawable(getContext(), redId));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…