|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ViewParent
Defines the responsibilities for a class that will be a parent of a View. This is the API that a view sees when it wants to interact with its parent.
| Method Summary | |
|---|---|
void |
bringChildToFront(View child)
Change the z order of the child so it's on top of all other children |
void |
childDrawableStateChanged(View child)
This method is called on the parent when a child's drawable state has changed. |
void |
clearChildFocus(View child)
Called when a child of this parent is giving up focus |
void |
createContextMenu(ContextMenu menu)
Have the parent populate the specified context menu if it has anything to add (and then recurse on its parent). |
void |
focusableViewAvailable(View v)
Tells the parent that a new focusable view has become available. |
View |
focusSearch(View v,
int direction)
Find the nearest view in the specified direction that wants to take focus |
boolean |
getChildVisibleRect(View child,
Rect r,
Point offset)
|
ViewParent |
getParent()
Returns the parent if it exists, or null. |
void |
invalidateChild(View child,
Rect r)
All or part of a child is dirty and needs to be redrawn. |
ViewParent |
invalidateChildInParent(int[] location,
Rect r)
All or part of a child is dirty and needs to be redrawn. |
boolean |
isLayoutRequested()
Indicates whether layout was requested on this view parent. |
void |
recomputeViewAttributes(View child)
Tell view hierarchy that the global view attributes need to be re-evaluated. |
void |
requestChildFocus(View child,
View focused)
Called when a child of this parent wants focus |
void |
requestDisallowInterceptTouchEvent(boolean disallowIntercept)
Called when a child does not want this parent and its ancestors to intercept touch events with ViewGroup.onInterceptTouchEvent(MotionEvent). |
void |
requestLayout()
Called when something has changed which has invalidated the layout of a child of this view parent. |
void |
requestTransparentRegion(View child)
Called when a child wants the view hierarchy to gather and report transparent regions to the window compositor. |
boolean |
showContextMenuForChild(View originalView)
Bring up a context menu for the specified view or its ancestors. |
| Method Detail |
|---|
void requestLayout()
boolean isLayoutRequested()
void requestTransparentRegion(View child)
child - the view requesting the transparent region computation
void invalidateChild(View child,
Rect r)
child - The child which is dirtyr - The area within the child that is invalid
ViewParent invalidateChildInParent(int[] location,
Rect r)
location - An array of 2 ints containing the left and top
coordinates of the child to invalidater - The area within the child that is invalid
ViewParent getParent()
void requestChildFocus(View child,
View focused)
child - The child of this ViewParent that wants focus. This view
will contain the focused view. It is not necessarily the view that
actually has focus.focused - The view that is a descendant of child that actually has
focusvoid recomputeViewAttributes(View child)
child - View whose attributes have changed.void clearChildFocus(View child)
child - The view that is giving up focus
boolean getChildVisibleRect(View child,
Rect r,
Point offset)
View focusSearch(View v,
int direction)
v - The view that currently has focusdirection - One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHTvoid bringChildToFront(View child)
child - void focusableViewAvailable(View v)
v - The view that has become newly focusableboolean showContextMenuForChild(View originalView)
In most cases, a subclass does not need to override this. However, if
the subclass is added directly to the window manager (for example,
ViewManager.addView(View, android.view.ViewGroup.LayoutParams))
then it should override this and show the context menu.
originalView - The source view where the context menu was first invoked
void createContextMenu(ContextMenu menu)
menu - The menu to populatevoid childDrawableStateChanged(View child)
child - The child whose drawable state has changed.void requestDisallowInterceptTouchEvent(boolean disallowIntercept)
ViewGroup.onInterceptTouchEvent(MotionEvent).
This parent should pass this call onto its parents. This parent must obey this request for the duration of the touch (that is, only clear the flag after this parent has received an up or a cancel.
disallowIntercept - True if the child does not want the parent to
intercept touch events.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||