一句话看懂getactivity和this区别


down vote

getActivity() is used for fragment. For activity, wherever you can use 'this', you can replace the 'this' in fragment in similar cases with 'getActivity()'.

你可能感兴趣的:(一句话看懂getactivity和this区别)