Communicating within nested Fragments: getParentFragment() runtime error
Currently, my application has a place where it uses nested fragments (a fragment within another fragment). Since I need to pass back information from the inner fragment to the outer one, I tried to use the interface method as with Activity-Fragment communication.
However, I am getting the error when I try to call getParentFragment within the inner one:
java.lang.NoSuchMethodError: com.tennisstats.Player1ServiceFragment.getParentFragment
Is there a better method for communicating between the nested fragment and its parent? One thing to mention is that the error could be due to how I incorporated the support v4 library into my project, because I was having problems using importing both that and ActionBarSherlock together.
Currently, my application has a place where it uses nested fragments (a fragment within another fragment). Since I need to pass back information from the inner fragment to the outer one, I tried to use the interface method as with Activity-Fragment communication.
However, I am getting the error when I try to call getParentFragment within the inner one:
java.lang.NoSuchMethodError: com.tennisstats.Player1ServiceFragment.getParentFragment
Is there a better method for communicating between the nested fragment and its parent? One thing to mention is that the error could be due to how I incorporated the support v4 library into my project, because I was having problems using importing both that and ActionBarSherlock together.
No comments:
Post a Comment