public class

CarouselHost

extends FrameLayout
implements ViewTreeObserver.OnTouchModeChangeListener
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.htc.fragment.widget.CarouselHost

Class Overview

Container for a tabbed window view. This object holds two children: a set of tab labels that the user clicks to select a specific tab, and a FrameLayout object that displays the contents of that page. The individual elements are typically controlled using this container object, rather than setting values on the child elements themselves. CarouselHost is a modification version of TabSwitchHost for supporting edit mode window

Summary

Nested Classes
interface CarouselHost.OnTabChangeListener Interface definition for a callback to be invoked when tab changed  
Constants
int DRAG_ACTION_COPY
int DRAG_ACTION_MOVE
int TASK_STATE_DEFAULT TASK_STATE_DEFAULT: in CarouselWidget initially and can be drag to pool
int TASK_STATE_POOL TASK_STATE_POOL: in pool initially and can be dragged back to the pool once in CarouselWidget
int TASK_STATE_UNREMOVABLE TASK_STATE_UNREMOVABLE: in CarouselWidget initially and can't be dragged to the pool
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
Public Constructors
CarouselHost(Context context)
CarouselHost(Context context, AttributeSet attrs)
Public Methods
void addPanelView(View panelView)
void addTab(Context context, CarouselTabSpec spec)
boolean dispatchKeyEvent(KeyEvent event)
CarouselWidget getCarouselWidget()
Returns the TabSwitchWidget
int getCurrentTab()
Returns the index of current tab
Fragment getCurrentTabFragment()
Returns the fragment of the current tab
String getCurrentTabTag()
Returns the tag of the current tab
void removeTabByTag(String tag)
remove a tab from Database.
void setAlternativeTabName(String tag, CharSequence text)
void setCountText(String tag, CharSequence text)
void setCountVisibility(String tag, boolean enable)
void setCurrentTabByTag(String tag)
Sets current tab to the specified tag
abstract void startDrag(View arg0, DragSource arg1, Object arg2, int arg3)
void stopTabByTag(String tag)
void switchPanelView()
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.graphics.drawable.Drawable.Callback2
From interface android.view.HtcIfViewGroup
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.ViewTreeObserver.OnTouchModeChangeListener
From interface android.view.accessibility.AccessibilityEventSource

Constants

public static final int DRAG_ACTION_COPY

Since: API Level

Constant Value: 1 (0x00000001)

public static final int DRAG_ACTION_MOVE

Since: API Level

Constant Value: 0 (0x00000000)

public static final int TASK_STATE_DEFAULT

Since: API Level 4.0

TASK_STATE_DEFAULT: in CarouselWidget initially and can be drag to pool

Constant Value: 99 (0x00000063)

public static final int TASK_STATE_POOL

Since: API Level 4.0

TASK_STATE_POOL: in pool initially and can be dragged back to the pool once in CarouselWidget

Constant Value: 100 (0x00000064)

public static final int TASK_STATE_UNREMOVABLE

Since: API Level 4.0

TASK_STATE_UNREMOVABLE: in CarouselWidget initially and can't be dragged to the pool

Constant Value: 101 (0x00000065)

Public Constructors

public CarouselHost (Context context)

Since: API Level 4.0

public CarouselHost (Context context, AttributeSet attrs)

Since: API Level 4.0

Public Methods

public void addPanelView (View panelView)

Since: API Level 4.0

public void addTab (Context context, CarouselTabSpec spec)

Since: API Level 4.0

public boolean dispatchKeyEvent (KeyEvent event)

Since: API Level

public CarouselWidget getCarouselWidget ()

Since: API Level 4.0

Returns the TabSwitchWidget

Returns
  • The TabSwitchWidget

public int getCurrentTab ()

Since: API Level 4.0

Returns the index of current tab

Returns
  • The index of current tab

public Fragment getCurrentTabFragment ()

Since: API Level 4.0

Returns the fragment of the current tab

Returns
  • The fragment of the current tab

public String getCurrentTabTag ()

Since: API Level 4.0

Returns the tag of the current tab

Returns
  • The tag of the current tab

public void removeTabByTag (String tag)

Since: API Level 4.0

remove a tab from Database.

public void setAlternativeTabName (String tag, CharSequence text)

Since: API Level 4.0

public void setCountText (String tag, CharSequence text)

Since: API Level 4.0

public void setCountVisibility (String tag, boolean enable)

Since: API Level 4.0

public void setCurrentTabByTag (String tag)

Since: API Level 4.0

Sets current tab to the specified tag

Parameters
tag The tag name of the tab

public abstract void startDrag (View arg0, DragSource arg1, Object arg2, int arg3)

Since: API Level 4.0

public void stopTabByTag (String tag)

Since: API Level

public void switchPanelView ()

Since: API Level 4.0