Skip to content
This repository was archived by the owner on Nov 14, 2018. It is now read-only.
This repository was archived by the owner on Nov 14, 2018. It is now read-only.

Improve View.doOnPreDraw(...) #588

@andkulikov

Description

@andkulikov

Hi,
Recently I found OneShotPreDrawListener class in android framework which looks for me like a solution which covers all the cornercases like removing the view from the hierarchy before the first drawing:
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/com/android/internal/view/OneShotPreDrawListener.java
Don't you think View.doOnPreDraw(...) should use analog of it internally(with addOnAttachStateChangeListener)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions