Most visited

Recently visited

Added in API level 1

ViewTreeObserver.OnPreDrawListener

public static interface ViewTreeObserver.OnPreDrawListener

android.view.ViewTreeObserver.OnPreDrawListener
Known Indirect Subclasses


当将要绘制视图树时调用回调的接口定义。

Summary

Public methods

abstract boolean onPreDraw()

将在将要绘制视图树时调用回调方法。

Public methods

onPreDraw

Added in API level 1
boolean onPreDraw ()

将在将要绘制视图树时调用回调方法。 此时,树中的所有视图都被测量并给出一帧。 客户可以使用它来调整它们的滚动范围,甚至可以在绘图之前请求新的布局。

Returns
boolean Return true to proceed with the current drawing pass, or false to cancel.

也可以看看:

Hooray!