createView

@Nullable
fun createView(@Nullable parent: @Nullable View, @NonNull name: @NonNull String, @NonNull context: @NonNull Context, @NonNull attrs: @NonNull AttributeSet, inheritContext: Boolean, readAndroidTheme: Boolean, readAppTheme: Boolean, wrapContext: Boolean): @Nullable View(source)

Creates an AppCompat-compatible widget by automatically "substituting" all usages of core Android widgets with the AppCompat extensions of those widgets.

Most developers should not call this method directly. Instead, use the layout inflater provided by getLayoutInflater or call createView.

Return

an AppCompat-compatible widget

Parameters

parent

the hierarchical parent of the view, if any

name

class name of the view, must be a simple class name like TextView for core Android widgets

context

context against which the view should be constructed, may be wrapped for theming purposes or fully replaced if inheritContext is true

attrs

attribute set to pass to the view constructor

inheritContext

true to construct the view against the parent view's context instead of context, or false to use context

readAndroidTheme

true to parse android:theme from attrs and wrap the view's construction context if necessary

readAppTheme

true to parse app:theme from attrs and wrap the view's construction context if necessary

wrapContext

true to wrap the view's construction context to provide additional resource system feature backports