Stay organized with collections
Save and categorize content based on your preferences.
TabHost.TabContentFactory
public
static
interface
TabHost.TabContentFactory
android.widget.TabHost.TabContentFactory
|
Makes the content of a tab when it is selected. Use this if your tab
content needs to be created on demand, i.e. you are not showing an
existing view or starting an activity.
Summary
Public methods
createTabContent
public abstract View createTabContent (String tag)
Callback to make the tab contents
Parameters |
tag |
String : Which tab was selected. |
Returns |
View |
The view to display the contents of the selected tab. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# TabHost.TabContentFactory\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nTabHost.TabContentFactory\n=========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/widget/TabHost.TabContentFactory \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nTabHost.TabContentFactory\n`\n\n\n`\n\n\n`\n\n|------------------------------------------|\n| android.widget.TabHost.TabContentFactory |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nMakes the content of a tab when it is selected. Use this if your tab\ncontent needs to be created on demand, i.e. you are not showing an\nexisting view or starting an activity.\n\nSummary\n-------\n\n| ### Public methods ||\n|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[View](/reference/android/view/View) | ` `[createTabContent](/reference/android/widget/TabHost.TabContentFactory#createTabContent(java.lang.String))`(`[String](/reference/java/lang/String)` tag) ` Callback to make the tab contents |\n\nPublic methods\n--------------\n\n### createTabContent\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract View createTabContent (String tag)\n```\n\nCallback to make the tab contents\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|------------------------------------------|\n| `tag` | `String`: Which tab was selected. \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------|--------------------------------------------------------------|\n| [View](/reference/android/view/View) | The view to display the contents of the selected tab. \u003cbr /\u003e |"]]