# TabHost.TabContentFactory

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

# TabHost.TabContentFactory

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/widget/TabHost.TabContentFactory "View this page in Kotlin")\|Java

`
public
static


interface
TabHost.TabContentFactory
`  
`


`

|------------------------------------------|
| android.widget.TabHost.TabContentFactory |

<br />

*** ** * ** ***

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                                                                                                                                                            ||
|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[View](https://developer.android.com/reference/android/view/View) | ` `[createTabContent](https://developer.android.com/reference/android/widget/TabHost.TabContentFactory#createTabContent(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` tag) ` Callback to make the tab contents |

## Public methods

### createTabContent

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract View createTabContent (String tag)
```

Callback to make the tab contents

<br />

|                   Parameters                    ||
|-------|------------------------------------------|
| `tag` | `String`: Which tab was selected. <br /> |

|                                                             Returns                                                             ||
|-------------------------------------------------------------------|--------------------------------------------------------------|
| [View](https://developer.android.com/reference/android/view/View) | The view to display the contents of the selected tab. <br /> |