Java android.view ViewTreeObserver fields, constructors, methods, implement or subclass

Example usage for Java android.view ViewTreeObserver fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.view ViewTreeObserver.

The text is from its open source code.

Method

voidaddOnDrawListener(OnDrawListener listener)

Register a callback to be invoked when the view tree is about to be drawn.

Note: this method cannot be invoked from android.view.ViewTreeObserver.OnDrawListener#onDraw() .

voidaddOnGlobalFocusChangeListener(OnGlobalFocusChangeListener listener)
Register a callback to be invoked when the focus state within the view tree changes.
voidaddOnGlobalLayoutListener(OnGlobalLayoutListener listener)
Register a callback to be invoked when the global layout state or the visibility of views within the view tree changes
voidaddOnPreDrawListener(OnPreDrawListener listener)
Register a callback to be invoked when the view tree is about to be drawn
voidaddOnScrollChangedListener(OnScrollChangedListener listener)
Register a callback to be invoked when a view has been scrolled.
voidaddOnTouchModeChangeListener(OnTouchModeChangeListener listener)
Register a callback to be invoked when the invoked when the touch mode changes.
voidaddOnWindowFocusChangeListener(OnWindowFocusChangeListener listener)
Register a callback to be invoked when the window focus state within the view tree changes.
booleanisAlive()
Indicates whether this ViewTreeObserver is alive.
voidremoveGlobalOnLayoutListener(OnGlobalLayoutListener victim)
Remove a previously installed global layout callback
voidremoveOnDrawListener(OnDrawListener victim)

Remove a previously installed pre-draw callback.

Note: this method cannot be invoked from android.view.ViewTreeObserver.OnDrawListener#onDraw() .

voidremoveOnGlobalFocusChangeListener(OnGlobalFocusChangeListener victim)
Remove a previously installed focus change callback.
voidremoveOnGlobalLayoutListener(OnGlobalLayoutListener victim)
Remove a previously installed global layout callback
voidremoveOnPreDrawListener(OnPreDrawListener victim)
Remove a previously installed pre-draw callback
voidremoveOnTouchModeChangeListener(OnTouchModeChangeListener victim)
Remove a previously installed touch mode change callback