public final class ViewUtil
extends java.lang.Object
View.| Modifier and Type | Method and Description |
|---|---|
static void |
removeOnGlobalLayoutListener(android.view.ViewTreeObserver observer,
android.view.ViewTreeObserver.OnGlobalLayoutListener listener)
Removes a previous registered global layout listener from a view tree observer.
|
static void |
setBackground(android.view.View view,
android.graphics.drawable.Drawable background)
Sets the background of a view.
|
public static void setBackground(android.view.View view,
android.graphics.drawable.Drawable background)
view - The view, whose background should be set, as an instance of the class View.
The view may not be nullbackground - The background, which should be set, as an instance of the class Drawable, or
null, if no background should be setpublic static void removeOnGlobalLayoutListener(android.view.ViewTreeObserver observer,
android.view.ViewTreeObserver.OnGlobalLayoutListener listener)
observer - The view tree observer, the listener should be removed from, as an instance of the
class ViewTreeObserver. The view tree observer may not be nulllistener - The listener, which should be removed from the view tree observer, as an instance of
the type ViewTreeObserver.OnGlobalLayoutListener