Created
November 4, 2016 09:48
-
-
Save nex3z/d3decfadb565403bc248600ee4b660dc 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
static class MyHandler extends Handler { | |
private final WeakReference<MyActivity> mRef; | |
MyHandler(MyActivity activity) { | |
mRef = new WeakReference<HomeActivity>(activity); | |
} | |
@Override | |
public void handleMessage(Message msg) { | |
MyActivity activity = mRef.get(); | |
if (activity != null) { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment