1 /*
2  * Copyright 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package androidx.core.view;
18 
19 import android.content.Context;
20 import android.util.AttributeSet;
21 import android.view.View;
22 
23 /**
24  * Used with {@code LayoutInflaterCompat.setFactory()}. Offers the same API as
25  * {@link android.view.LayoutInflater.Factory2}.
26  *
27  * @deprecated Use {@link android.view.LayoutInflater.Factory2} directly.
28  */
29 @Deprecated
30 public interface LayoutInflaterFactory {
31 
32     /**
33      * Hook you can supply that is called when inflating from a LayoutInflater.
34      * You can use this to customize the tag names available in your XML
35      * layout files.
36      *
37      * @param parent The parent that the created view will be placed
38      * in; <em>note that this may be null</em>.
39      * @param name Tag name to be inflated.
40      * @param context The context the view is being created in.
41      * @param attrs Inflation attributes as specified in XML file.
42      *
43      * @return View Newly created view. Return null for the default
44      *         behavior.
45      */
onCreateView(View parent, String name, Context context, AttributeSet attrs)46     View onCreateView(View parent, String name, Context context, AttributeSet attrs);
47 
48 }
49