1. ((ViewGroup)findViewById(android.R.id.content)).getChildAt(0)

2. findViewById(R.id.xxxxxx)  -- xxxxxx是对应xml文件中的根控件

可以通过getId()方法验证1,2返回的对象是否相同。

相关文章: