android开发中fragment获取context

在用到fragment时无法使用.this来指定当前context内容,android开发中fragment获取context,可以使用getActivity().getApplicationContext(),来获取context内容;

posted @ 2016-03-19 09:36  孤帆远航666  阅读(2356)  评论(1编辑  收藏  举报