class类名 名字 = calss类名 getFragmentManager().findFragmentById(R.id.布局id) 因为需要获取到片段的管理者,才可以去寻找到相应的布局。 转载于:https://www.cnblogs.com/zengsf/p/8806466.html