# 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)

*** ** * ** ***


```
public 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 methods |
|---|---|
| `abstract https://developer.android.com/reference/android/view/View.html` | `[onCreateView](https://developer.android.com/reference/androidx/core/view/LayoutInflaterFactory#onCreateView(android.view.View,java.lang.String,android.content.Context,android.util.AttributeSet))( https://developer.android.com/reference/android/view/View.html parent, https://developer.android.com/reference/java/lang/String.html name, https://developer.android.com/reference/android/content/Context.html context, https://developer.android.com/reference/android/util/AttributeSet.html attrs )` **This method is deprecated.** Deprecated in Java |

## Public methods

### 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)

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

> [!CAUTION]
> **This method 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 |
|---|---|
| `https://developer.android.com/reference/android/view/View.html parent` | The parent that the created view will be placed in; *note that this may be null*. |
| `https://developer.android.com/reference/java/lang/String.html name` | Tag name to be inflated. |
| `https://developer.android.com/reference/android/content/Context.html context` | The context the view is being created in. |
| `https://developer.android.com/reference/android/util/AttributeSet.html attrs` | 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. |