1

Here is the post I need clarified (I am unable to comment on this post because I am a new user, and I tried asking a question below it that just got deleted):

How to implement OnFragmentInteractionListener

I am getting the exact same error as this user, under the exact same scenario, and on his post, he says it is working, however he never explicitly explains what exactly he did. Can anyone shed some light on how this was solved??

Where exactly does the

implements OnFragmentInteractionListener

go?

because currently the activity I am trying to call the other fragments in is as follows:

public class MyActivity extends Activity implements NavigationDrawerFragment.NaviationDrawerCallbacks{

I have no clue where to slot in the missing implements.

Any and all clarification helps!

My exact problem is defined in that above post on StackOverflow, let me know if I can do anything else to clarify this question!

Thanks!

Community
  • 1
  • 1
Bwvolleyball
  • 2,593
  • 2
  • 19
  • 31

1 Answers1

2

A single class can implement more than one interface:

public class MyActivity extends Activity implements OnFragmentInteractionListener, NavigationDrawerFragment.NaviationDrawerCallbacks {
mstrthealias
  • 2,781
  • 2
  • 22
  • 18
  • Thank you very much! I kept trying to do something of the sort with the double implements, I just couldn't get it. I was struggling greatly, and that one simple line fixed it all. Thank you so very much! I tried to vote up your answer, but that requires 15 reputation. – Bwvolleyball Jul 21 '14 at 05:17