Last active
June 17, 2019 10:00
-
-
Save ahmedbr/18ea7fb7e2fec8ff2e8e927abd188bdc 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
new Handler(Looper.getMainLooper()).post(new Runnable() { | |
@Override | |
public void run() { | |
Toast.makeText(context, "Your text goes here ...", Toast.LENGTH_LONG).show(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
if you get such an error, then the solution is above in the gist.