Created
April 6, 2017 14:00
-
-
Save marcherdiego/002ed1e2cfae18d730052c15fb57abed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainView { | |
private final Bus bus; | |
private WeakReference<AppCompatActivity> activityRef; | |
public MainView(AppCompatActivityactivity, Bus bus) { | |
activityRef = new WeakReference<>(activity); | |
this.bus = bus; | |
} | |
@Nullable | |
public AppCompatActivity getActivity() { | |
return activityRef.get(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment