Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当按下返回键时,我可以获得我的活动布局吗?或者可以识别该活动的内容视图的东西?
((ViewGroup)findViewById(android.R.id.content)).getChildAt(0)
这应该返回当前活动的根视图
将 id 添加到布局的父视图,然后使用 findViewById() 提供父视图的 id 来获取引用。
我正在努力实现标题中提到的内容,但是遇到了麻烦,需要帮助。我正在修改以下模板
1. <xsl:template name="View_Default_RootTemplate" mode="RootTemplate" match="View"