获取默认主题的Context。
解析xm内容并创建其对应的View树。若解析失败则抛出InflateException异常。
Android Context对象,若要创建androidx相关的View,则必须指定Material相关主题的Context
xml内容
若attachToRoot为false,则指定parent为新创建的View的父View;若attachToRoot为false,则parent为解析xml过程中用于生成LayoutParams的View。默认为null。
创建新View后是否添加到parent中,默认为false
类似于Android中的R,用于获取资源相关的ID,比如
R.drawable.ic_launcher
,R.style.ScriptTheme
等。https://developer.android.google.cn/reference/android/R