|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.view.View
android.view.ViewGroup
com.wimm.framework.view.ViewTray
public class ViewTray
The ViewTray class is the root view for application navigation.
This class extends ViewGroup
to manage the multi-paneled presentation of child views.
Nested Class Summary | |
---|---|
static interface |
ViewTray.OnIndexChangeListener
The listener interface for receiving ViewTray.OnIndexChangeListener.onIndexDidChange(int) events when the visible child view changes. |
static interface |
ViewTray.Scrollable
Deprecated. Use ScrollView from WIMM SDK 1.0.3 onwards. |
Nested classes/interfaces inherited from class android.view.ViewGroup |
---|
ViewGroup.LayoutParams, ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener |
Nested classes/interfaces inherited from class android.view.View |
---|
View.BaseSavedState, View.MeasureSpec, View.OnClickListener, View.OnCreateContextMenuListener, View.OnFocusChangeListener, View.OnKeyListener, View.OnLongClickListener, View.OnTouchListener |
Field Summary |
---|
Fields inherited from class android.view.ViewGroup |
---|
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE |
Constructor Summary | |
---|---|
ViewTray(Context context)
The ViewTray constructor. |
|
ViewTray(Context context,
AttributeSet attrs)
Instantiates a new view tray. |
|
ViewTray(Context context,
AttributeSet attrs,
int defStyle)
Instantiates a new view tray. |
Method Summary | |
---|---|
View |
getActiveView()
Gets the active view. |
int |
getIndex()
Gets the ViewTray index. |
int |
getInternalViewScrollOffset()
Gets the internal view scroll offset. |
int |
getItemCount()
Gets the item count. |
void |
onDrag(MotionEvent e,
MotionInterpreter.ScrollAxis scrollAxis,
int scrollDelta)
On drag. |
void |
onDragEnd(MotionEvent e,
MotionInterpreter.ScrollAxis scrollAxis,
float velocity)
Listens for an OnDragEnd event. |
void |
onInterruptingOneFingerTap(MotionEvent e)
On animation-interrupting one finger tap. |
protected void |
onLayout(boolean changed,
int l,
int t,
int r,
int b)
|
void |
onLongTap(MotionEvent e)
On long tap. |
boolean |
onMotionBegin(MotionEvent e)
Listens for a motion event and interprets the event behaviors. |
void |
onMotionCancel(MotionEvent e)
Listens for the canceling of a motion event |
void |
onMotionEnd(MotionEvent e)
Listens for the end of a motion event. |
void |
onOneFingerTap(MotionEvent e)
On one finger tap. |
void |
onTwoFingerTap(MotionEvent e)
On two finger tap. |
void |
setCanScrollInternalView(boolean canScrollInternalView)
Deprecated. Not required from WIMM SDK 1.0.3 onwards. |
void |
setIndex(int index)
Sets the index. |
void |
setIndex(int index,
boolean animate)
Sets the index. |
void |
setOnIndexChangeListener(ViewTray.OnIndexChangeListener indexChangeListener)
Sets the index change listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface android.view.ViewParent |
---|
createContextMenu, getParent, isLayoutRequested, requestLayout |
Constructor Detail |
---|
public ViewTray(Context context)
context
- The Context
.public ViewTray(Context context, AttributeSet attrs)
context
- The Context
.attrs
- The AttributeSet
.public ViewTray(Context context, AttributeSet attrs, int defStyle)
context
- The Context
.attrs
- The AttributeSet
.defStyle
- The Style Resource.Method Detail |
---|
public void setOnIndexChangeListener(ViewTray.OnIndexChangeListener indexChangeListener)
indexChangeListener
- The index change listener.public int getItemCount()
ViewTray
.public int getIndex()
ViewTray
index.
public View getActiveView()
View
.public void setIndex(int index)
index
- The index.public void setIndex(int index, boolean animate)
index
- The index.animate
- True if the view tray should animate to the new index.public void setCanScrollInternalView(boolean canScrollInternalView)
canScrollInternalView
- Set to true if the view tray should animate to the new index.public boolean onMotionBegin(MotionEvent e)
onMotionBegin
in interface MotionInterpreter.OnMotionHandler
e
- The MotionEvent
.
public void onMotionEnd(MotionEvent e)
onMotionEnd
in interface MotionInterpreter.OnMotionHandler
e
- The MotionEvent
.public void onMotionCancel(MotionEvent e)
onMotionCancel
in interface MotionInterpreter.OnMotionHandler
e
- The MotionEvent
.public void onOneFingerTap(MotionEvent e)
onOneFingerTap
in interface MotionInterpreter.OnMotionHandler
e
- The MotionEvent
.public void onTwoFingerTap(MotionEvent e)
onTwoFingerTap
in interface MotionInterpreter.OnMotionHandler
e
- The MotionEvent
.public void onLongTap(MotionEvent e)
onLongTap
in interface MotionInterpreter.OnMotionHandler
e
- The MotionEvent
.public void onInterruptingOneFingerTap(MotionEvent e)
onInterruptingOneFingerTap
in interface MotionInterpreter.OnMotionHandler
e
- The MotionEvent
.public void onDrag(MotionEvent e, MotionInterpreter.ScrollAxis scrollAxis, int scrollDelta)
onDrag
in interface MotionInterpreter.OnMotionHandler
e
- The MotionEvent
.scrollAxis
- The scroll axis.scrollDelta
- The scroll delta.public void onDragEnd(MotionEvent e, MotionInterpreter.ScrollAxis scrollAxis, float velocity)
OnDragEnd
event.
onDragEnd
in interface MotionInterpreter.OnMotionHandler
e
- The MotionEvent
.scrollAxis
- The scroll axis.velocity
- The scroll velocity.public int getInternalViewScrollOffset()
protected void onLayout(boolean changed, int l, int t, int r, int b)
onLayout
in class ViewGroup
|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |