java.lang.Object | ||||||
↳ | android.content.Context | |||||
↳ | android.content.ContextWrapper | |||||
↳ | android.view.ContextThemeWrapper | |||||
↳ | android.app.Activity | |||||
↳ | android.app.ActivityGroup | |||||
↳ | com.htc.widget.CarouselActivity |
This class is deprecated.
Not supported class
An activity that contains and runs multiple embedded activities or views. For having a tab with edit mode, the things you must done are as the following:
super()
with
the authority of your database which contains the information of
every element of your tab as the parameter is required. Also, for supporting
nested tabs, a group ID is required for your activity in its onCreate()
.
function. A change to the prototype of CarouselHost.addTab()
is
done for more elegant way of function call. Please refer to the following example
for all the important notices mentioned above:
public class DemoActivity extends CarouselActivity { final static String AUTHORITY = "com.htc.app.MyProvider"; public DemoActivity() { super(AUTHORITY); } public void onCreate(Bundle savedInstanceState) { this.setGId(1); super.onCreate(savedInstanceState); //Do some settings and add your tab items setContentView(R.layout.carousel_switch); final CarouselHost mPanelHost = getTabHost(); for(int i=0 ; i<1;i++){ mPanelHost.addTab("Artist", this , R.string.artists_title , R.drawable.common_icon_artist_rest , R.drawable.common_icon_artist_on , R.drawable.common_icon_overlay_artist , (new Intent("com.htc.test.show11"))); mPanelHost.setCountVisibility(0+i*6, false); mPanelHost.setCountText(0+i*6,new Integer(0+i*6).toString()); ... } ... } }
public class MyProvider extends CarouselProvider { final static String AUTHORITY = "com.borran.app.MyProvider"; public MyProvider(){ super(); setupCarousel(AUTHORITY); } }
onCreateDialog(int id)
, please do it
as the following example code:
protected Dialog onCreateDialog(int id) { Dialog dialog = super.onCreateDialog(id); if(dialog == null){ dialog = create your own dialog } return dialog; }
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FEATURE_CUSTOM_TITLE | ||||||||||
int | FEATURE_NO_EDITOR | ||||||||||
int | FEATURE_NO_TITLE | ||||||||||
int | NO_UPDATE_REQUIRED | ||||||||||
int | UPDATE_COUNT_TEXT | ||||||||||
int | UPDATE_COUNT_TEXT_VISIBLE | ||||||||||
int | UPDATE_TASK_NAME |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the
CarouselHost the activity is using to host its tabs. | |||||||||||
Returns the
CarouselWidget the activity is using to draw the actual tabs. | |||||||||||
Updates the screen state (current list and other views) when the
content changes.
| |||||||||||
callback function when the current tab is changed
| |||||||||||
A callback function for knowing when the user ends the drag motion
| |||||||||||
A callback function for knowing when the user starts to drag the
tab selector
| |||||||||||
Enables extended screen features.
| |||||||||||
Sets the integer value for a feature.
| |||||||||||
Sets the default tab that is the first tab highlighted.
| |||||||||||
Sets the default tab that is the first tab highlighted.
| |||||||||||
When there are several carousels in your application,
you need to assign each carousel to an unique id.
| |||||||||||
When there are several carousels in your application,
you need to assign each carousel to an unique id.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructor
authority | The authority of your database which is used to maintain the information of every element of your tab |
---|
Returns the CarouselHost
the activity is using to host its tabs.
CarouselHost
the activity is using to host its tabs.
Returns the CarouselWidget
the activity is using to draw the actual tabs.
CarouselWidget
the activity is using to draw the actual tabs.
Updates the screen state (current list and other views) when the content changes.
callback function when the current tab is changed
currentTab | The tag of the current tab |
---|
A callback function for knowing when the user ends the drag motion
endTag | The tag of the tab which the user end up dragging the tab indicator |
---|
A callback function for knowing when the user starts to drag the tab selector
startTag | The tag of tab which the users start the dragging |
---|
Enable extended screen features. This must be called before
setContentView(). May be called as many times as desired as long as it
is before setContentView(). If not called, no extended features
will be available. You can not turn off a feature once it is requested.
You canot use other title features with FEATURE_CUSTOM_TITLE
.
featureId | The desired features, defined as constants by Window. |
---|
Sets the integer value for a feature. The range of the value depends on the feature being set.
featureId | The desired feature to change. Features are constants defined by Carousel. |
---|---|
value | The value for the feature. The interpretation of this value is feature-specific. |
Sets the default tab that is the first tab highlighted.
index | The index of the default tab |
---|
Sets the default tab that is the first tab highlighted.
tag | The name of the default tab |
---|
When there are several carousels in your application, you need to assign each carousel to an unique id.
gId | Unique Id |
---|
When there are several carousels in your application, you need to assign each carousel to an unique id.
gId | Unique Id |
---|