public class HostView extends Host
Constructor and Description |
---|
HostView(Context context) |
HostView(Context context,
AttributeSet attrs) |
Modifier and Type | Method and Description |
---|---|
void |
dispatchDraw(Canvas canvas) |
void |
draw(Canvas canvas) |
protected void |
drawableStateChanged() |
protected int |
getChildDrawingOrder(int childCount,
int i) |
java.lang.String |
getDescriptionOfMountedItems() |
MountItem |
getMountItemAt(int index) |
int |
getMountItemCount() |
java.lang.Object |
getTag() |
java.lang.Object |
getTag(int key) |
void |
jumpDrawablesToCurrentState() |
void |
mount(int index,
MountItem mountItem)
Mounts the given
MountItem with unique index. |
void |
moveItem(MountItem item,
int oldIndex,
int newIndex)
Moves the MountItem associated to oldIndex in the newIndex position.
|
boolean |
onInterceptTouchEvent(MotionEvent ev) |
protected void |
onLayout(boolean changed,
int l,
int t,
int r,
int b) |
protected void |
onSizeChanged(int w,
int h,
int oldw,
int oldh) |
boolean |
onTouchEvent(MotionEvent event) |
void |
requestLayout() |
void |
safelyUnmountAll()
Use this API to remove all mounted items from the Host to recover from errors.
|
void |
setForegroundCompat(Drawable drawable) |
void |
setInLayout() |
void |
setInterceptTouchEventHandler(InterceptTouchHandler interceptTouchEventHandler)
Sets an InterceptTouchHandler that will be invoked when
onInterceptTouchEvent(MotionEvent)
is called. |
void |
setViewTag(java.lang.Object viewTag)
Sets view tag on this host.
|
void |
setViewTags(<any> viewTags)
Sets view tags on this host.
|
void |
setVisibility(int visibility) |
boolean |
shouldDelayChildPressedState() |
protected boolean |
shouldRequestLayout() |
void |
unmount(int index,
MountItem mountItem)
Unmounts the given
MountItem with unique index. |
void |
unmount(MountItem item)
Unmounts the given
MountItem |
void |
unsetInLayout() |
protected boolean |
verifyDrawable(Drawable who) |
getClipChildren, setClipChildren
public HostView(Context context)
public HostView(Context context, AttributeSet attrs)
public void mount(int index, MountItem mountItem)
Host
MountItem
with unique index.public void unmount(MountItem item)
Host
MountItem
public void unmount(int index, MountItem mountItem)
Host
MountItem
with unique index.public int getMountItemCount()
getMountItemCount
in class Host
MountItem
s that are currently mounted in the host.public MountItem getMountItemAt(int index)
getMountItemAt
in class Host
MountItem
that was mounted with the given index.public void moveItem(MountItem item, int oldIndex, int newIndex)
Host
Host.unmount(int, MountItem)
or Host.moveItem(MountItem, int,
int)
.public void setInterceptTouchEventHandler(InterceptTouchHandler interceptTouchEventHandler)
onInterceptTouchEvent(MotionEvent)
is called.interceptTouchEventHandler
- the handler to be set on this host.public boolean onInterceptTouchEvent(MotionEvent ev)
public void dispatchDraw(Canvas canvas)
protected int getChildDrawingOrder(int childCount, int i)
public boolean shouldDelayChildPressedState()
public boolean onTouchEvent(MotionEvent event)
protected final void onLayout(boolean changed, int l, int t, int r, int b)
public void requestLayout()
protected boolean shouldRequestLayout()
protected boolean verifyDrawable(Drawable who)
protected void drawableStateChanged()
public void jumpDrawablesToCurrentState()
public void setVisibility(int visibility)
public void setViewTag(java.lang.Object viewTag)
viewTag
- the object to set as tag.public void setViewTags(<any> viewTags)
viewTags
- the map containing the tags by id.public java.lang.Object getTag()
public java.lang.Object getTag(int key)
protected void onSizeChanged(int w, int h, int oldw, int oldh)
public void draw(Canvas canvas)
public void setForegroundCompat(Drawable drawable)
public java.lang.String getDescriptionOfMountedItems()
getDescriptionOfMountedItems
in class Host
public void safelyUnmountAll()
Host
safelyUnmountAll
in class Host
public void setInLayout()
setInLayout
in class Host
public void unsetInLayout()
unsetInLayout
in class Host