# LayoutInflaterFactory

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/LayoutInflaterFactory.java+class:androidx.core.view.LayoutInflaterFactory) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
interface LayoutInflaterFactory
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This interface is deprecated.**   
>
> Use `https://developer.android.com/reference/android/view/LayoutInflater.Factory2.html` directly.

Used with `LayoutInflaterCompat.setFactory()`. Offers the same API as `https://developer.android.com/reference/android/view/LayoutInflater.Factory2.html`.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/android/view/View.html!` | `[onCreateView](https://developer.android.com/reference/kotlin/androidx/core/view/LayoutInflaterFactory#onCreateView(android.view.View,java.lang.String,android.content.Context,android.util.AttributeSet))( parent: https://developer.android.com/reference/android/view/View.html!, name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, context: https://developer.android.com/reference/android/content/Context.html!, attrs: https://developer.android.com/reference/android/util/AttributeSet.html! )` **This function is deprecated.** Deprecated in Java |

## Public functions

### onCreateView

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun [onCreateView](https://developer.android.com/reference/kotlin/androidx/core/view/LayoutInflaterFactory#onCreateView(android.view.View,java.lang.String,android.content.Context,android.util.AttributeSet))(
    parent: View!,
    name: String!,
    context: Context!,
    attrs: AttributeSet!
): View!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Hook you can supply that is called when inflating from a LayoutInflater. You can use this to customize the tag names available in your XML layout files.

| Parameters |
|---|---|
| `parent: https://developer.android.com/reference/android/view/View.html!` | The parent that the created view will be placed in; *note that this may be null*. |
| `name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | Tag name to be inflated. |
| `context: https://developer.android.com/reference/android/content/Context.html!` | The context the view is being created in. |
| `attrs: https://developer.android.com/reference/android/util/AttributeSet.html!` | Inflation attributes as specified in XML file. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/view/View.html!` | View Newly created view. Return null for the default behavior. |