在fragment中使用findviewbyid()
正常在fragment中直接添加findviewbyid会标红解决方法:添加一个getactivity()类类似于下面代码块就可以:show = (ListView) getActivity().findViewById( R.id.lv_show );
·
正常在fragment中直接添加findviewbyid会标红
解决方法:
添加一个getactivity()类
类似于下面代码块就可以:
show = (ListView) getActivity().findViewById( R.id.lv_show );
更多推荐

所有评论(0)