Android开发:如何获取Fragment控件和Fragment的ID
"Fragment控件的id可以通过在Fragment中调用getView().findViewById(int id)方法来获取,其中id是在Fragment布局文件中定义的控件id。\n\n而fragment控件的id可以通过在Activity中调用FragmentManager的findFragmentById(int id)方法来获取,其中id是在Activity布局文件中定义的fragment控件id。\n\n"
原文地址: http://www.cveoy.top/t/topic/p4tG 著作权归作者所有。请勿转载和采集!