onAttach(Activity) deprecated: where I can check if the activity implements callback interface

前端 未结 7 1039
再見小時候
再見小時候 2020-12-14 07:43

Before API 23 I used Fragment\'s onAttach methods to get my listener instance, then the reference is cleaned inside onDetach. ex:

@Override
public void onAtt         


        
7条回答
  •  误落风尘
    2020-12-14 08:37

    Well, what is deprecated is onAttach(Activity activity); method, but the whole flow remains. so you may do nothing really as onAttach(Activity activity); is going to be still supported long enough.

提交回复
热议问题