次の方法で共有


TabHost.Setup Method

Definition

Overloads

Setup()

Call setup() before adding tabs if loading TabHost using findViewById().

Setup(LocalActivityManager)

If you are using TabSpec#setContent(android.content.Intent), this must be called since the activityGroup is needed to launch the local activity.

Setup()

Call setup() before adding tabs if loading TabHost using findViewById().

[Android.Runtime.Register("setup", "()V", "GetSetupHandler")]
public virtual void Setup ();
[<Android.Runtime.Register("setup", "()V", "GetSetupHandler")>]
abstract member Setup : unit -> unit
override this.Setup : unit -> unit
Attributes

Remarks

Call setup() before adding tabs if loading TabHost using findViewById(). <b>However</b>: You do not need to call setup() after getTabHost() in android.app.TabActivity TabActivity. Example:

mTabHost = (TabHost)findViewById(R.id.tabhost);
            mTabHost.setup();
            mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1");

Java documentation for android.widget.TabHost.setup().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Setup(LocalActivityManager)

If you are using TabSpec#setContent(android.content.Intent), this must be called since the activityGroup is needed to launch the local activity.

[Android.Runtime.Register("setup", "(Landroid/app/LocalActivityManager;)V", "GetSetup_Landroid_app_LocalActivityManager_Handler")]
public virtual void Setup (Android.App.LocalActivityManager? activityGroup);
[<Android.Runtime.Register("setup", "(Landroid/app/LocalActivityManager;)V", "GetSetup_Landroid_app_LocalActivityManager_Handler")>]
abstract member Setup : Android.App.LocalActivityManager -> unit
override this.Setup : Android.App.LocalActivityManager -> unit

Parameters

activityGroup
LocalActivityManager

Used to launch activities for tab content.

Attributes

Remarks

If you are using TabSpec#setContent(android.content.Intent), this must be called since the activityGroup is needed to launch the local activity.

This is done for you if you extend android.app.TabActivity.

Java documentation for android.widget.TabHost.setup(android.app.LocalActivityManager).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to