GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: replaced deprecated onAttach with correct override · cnoldtree/RxJava-Android-Samples@b6ee8d9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app/src/main/java/com/morihacky/android/rxjava/fragments
    • RotationPersist1WorkerFragment.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎app/src/main/java/com/morihacky/android/rxjava/fragments/RotationPersist1WorkerFragment.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/fragments/RotationPersist1WorkerFragment.java
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
package com.morihacky.android.rxjava.fragments;
22

3-
import android.app.Activity;
3+
import android.content.Context;
44
import android.os.Bundle;
55
import android.support.v4.app.Fragment;
6+
67
import com.morihacky.android.rxjava.MainActivity;
8+
79
import java.util.List;
810
import java.util.concurrent.TimeUnit;
11+
912
import rx.Observable;
1013
import rx.Subscription;
1114
import 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;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.