Android Studio getting “Must implement OnFragmentInteractionListener”

前端 未结 3 1754
天涯浪人
天涯浪人 2021-02-19 10:52

I\'m getting a throw that says \"Must implement OnFragmentInteractionListener, and I already have it...

I\'ve looked at every question asked here, and no one helped me.<

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-19 11:20

    Just remove this line:

    throw RuntimeException(context.toString() + " must implement OnFragmentInteractionListener")
    

    There is no need to remove the entire method.

提交回复
热议问题