1、inflate(resId,root,false)
此時resId中的參數layout_*生效
2、inflate(resId,root,true)
在Adapter中getView()的情況下會出錯
3、inflate(resId,null,false)==inflate(resId,null,true)
此時,resId中的layout_*無效
一般使用到第一種情況的時候比較多,想要了解真正的內幕請去翻看源代碼。動手實驗一番,看別人的也不一定靠譜。
1、inflate(resId,root,false)
此時resId中的參數layout_*生效
2、inflate(resId,root,true)
在Adapter中getView()的情況下會出錯
3、inflate(resId,null,false)==inflate(resId,null,true)
此時,resId中的layout_*無效
一般使用到第一種情況的時候比較多,想要了解真正的內幕請去翻看源代碼。動手實驗一番,看別人的也不一定靠譜。