Most visited

Recently visited

Added in API level 1

TabHost.TabSpec

public class TabHost.TabSpec
extends Object

java.lang.Object
    android.widget.TabHost.TabSpec


选项卡包含选项卡指示符,内容和用于跟踪它的标记。 此构建器可帮助您在这些选项中进行选择 对于标签指示器,您的选择是:1)设置标签2)设置标签和图标对于标签内容,您的选择是:1) View 2) TabHost.TabContentFactory ,创建View内容。 3)一个Intent ,启动一个Activity

摘要(Summary)

公共方法(Public methods)

String getTag()
TabHost.TabSpec setContent(Intent intent)

指定一个用来启动活动作为选项卡内容的意图。

TabHost.TabSpec setContent(TabHost.TabContentFactory contentFactory)

指定一个 TabHost.TabContentFactory用于创建选项卡的内容。

TabHost.TabSpec setContent(int viewId)

指定应该用作选项卡内容的视图的ID。

TabHost.TabSpec setIndicator(View view)

指定一个视图作为选项卡指示器。

TabHost.TabSpec setIndicator(CharSequence label)

指定一个标签作为选项卡指示器。

TabHost.TabSpec setIndicator(CharSequence label, Drawable icon)

指定一个标签和图标作为选项卡指示器。

继承方法(Inherited methods)

From class java.lang.Object

公共方法(Public methods)

getTag

Added in API level 4
String getTag ()

返回(Returns)
String

setContent

Added in API level 1
TabHost.TabSpec setContent (Intent intent)

指定一个用来启动活动作为选项卡内容的意图。

参数(Parameters)
intent Intent
返回(Returns)
TabHost.TabSpec

setContent

Added in API level 1
TabHost.TabSpec setContent (TabHost.TabContentFactory contentFactory)

指定一个 TabHost.TabContentFactory用于创建选项卡的内容。

参数(Parameters)
contentFactory TabHost.TabContentFactory
返回(Returns)
TabHost.TabSpec

setContent

Added in API level 1
TabHost.TabSpec setContent (int viewId)

指定应该用作选项卡内容的视图的ID。

参数(Parameters)
viewId int
返回(Returns)
TabHost.TabSpec

setIndicator

Added in API level 4
TabHost.TabSpec setIndicator (View view)

指定一个视图作为选项卡指示器。

参数(Parameters)
view View
返回(Returns)
TabHost.TabSpec

setIndicator

Added in API level 1
TabHost.TabSpec setIndicator (CharSequence label)

指定一个标签作为选项卡指示器。

参数(Parameters)
label CharSequence
返回(Returns)
TabHost.TabSpec

setIndicator

Added in API level 1
TabHost.TabSpec setIndicator (CharSequence label, 
                Drawable icon)

指定一个标签和图标作为选项卡指示器。

参数(Parameters)
label CharSequence
icon Drawable
返回(Returns)
TabHost.TabSpec

Hooray!