File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
app/src/main/java/com/morihacky/android/rxjava/fragments Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 11package com .morihacky .android .rxjava .fragments ;
22
3- import android .app . Activity ;
3+ import android .content . Context ;
44import android .os .Bundle ;
55import android .support .v4 .app .Fragment ;
6+
67import com .morihacky .android .rxjava .MainActivity ;
8+
79import java .util .List ;
810import java .util .concurrent .TimeUnit ;
11+
912import rx .Observable ;
1013import rx .Subscription ;
1114import rx .functions .Func1 ;
@@ -24,10 +27,10 @@ public class RotationPersist1WorkerFragment
2427 * we can talk back to the master and send results
2528 */
2629 @ Override
27- public void onAttach (Activity activity ) {
28- super .onAttach (activity );
30+ public void onAttach (Context context ) {
31+ super .onAttach (context );
2932
30- List <Fragment > frags = ((MainActivity ) activity ).getSupportFragmentManager ().getFragments ();
33+ List <Fragment > frags = ((MainActivity ) context ).getSupportFragmentManager ().getFragments ();
3134 for (Fragment f : frags ) {
3235 if (f instanceof IAmYourMaster ) {
3336 _masterFrag = (IAmYourMaster ) f ;
You can’t perform that action at this time.
0 commit comments