我正在研究此链接中的fragment:http://developer.android.com/guide/components/fragments.html有一段代码如下:publicstaticclassExampleFragmentextendsFragment{@OverridepublicViewonCreateView(LayoutInflaterinflater,ViewGroupcontainer,BundlesavedInstanceState){//Inflatethelayoutforthisfragmentreturninflater.inflate(R.lay
LayoutInflater.inflate我对attachToRoot参数的用途并不十分清楚。attachToRoot:whethertheinflatedhierarchyshouldbeattachedtotherootparameter?Iffalse,rootisonlyusedtocreatethecorrectsubclassofLayoutParamsfortherootviewintheXML.谁能更详细地解释一下,特别是RootView是什么,并可能显示一个true和false值之间行为变化的示例? 最佳答案 现
LayoutInflater.inflate我对attachToRoot参数的用途并不十分清楚。attachToRoot:whethertheinflatedhierarchyshouldbeattachedtotherootparameter?Iffalse,rootisonlyusedtocreatethecorrectsubclassofLayoutParamsfortherootviewintheXML.谁能更详细地解释一下,特别是RootView是什么,并可能显示一个true和false值之间行为变化的示例? 最佳答案 现