LayoutInflater.Factory
public static interface LayoutInflater.Factory
android.view.LayoutInflater.Factory |
Known Indirect Subclasses
AccountAuthenticatorActivity,
ActionBarActivity,
Activity,
ActivityGroup,
AliasActivity,
AppCompatActivity,
ExpandableListActivity,
FragmentActivity,
LauncherActivity,
LayoutInflater.Factory2,
ListActivity,
NativeActivity,
PreferenceActivity,
TabActivity
|
Summary
Public methods
onCreateView
View onCreateView (String name,
Context context,
AttributeSet attrs)
钩子可以提供从LayoutInflater膨胀时调用的钩子。 您可以使用它来自定义XML布局文件中可用的标签名称。
请注意,将这些自定义名称与您的软件包(例如,com.coolcompany.apps)作为前缀以避免与系统名称冲突是一种好的做法。
Parameters |
name |
String : Tag name to be inflated. |
context |
Context : The context the view is being created in. |
attrs |
AttributeSet : Inflation attributes as specified in XML file. |
Returns |
View |
View Newly created view. Return null for the default behavior. |