What is different between getContext and getActivity from Fragment in support library?

前端 未结 8 739
深忆病人
深忆病人 2020-12-02 15:39

What is different between getContext() and getActivity() from Fragment in support library?

Do they always return the same obje

8条回答
  •  既然无缘
    2020-12-02 16:05

    getContext() :

    Returns the context view only current running activity.

    getActivity():

    Return the Activity this fragment is currently associated with.

提交回复
热议问题