Created
September 26, 2018 20:52
-
-
Save AbreuY/0e5889828ad20d2ffe823947407ba45d to your computer and use it in GitHub Desktop.
load files runOnUiThread
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 void loadFiles(){ | |
new Thread( | |
new Runnable() { | |
@Override | |
public void run() { | |
final Activity activity = getActivity(); | |
if(activity != null && isAdded()){ | |
activity.runOnUiThread(new Runnable() { | |
@Override | |
public void run() { | |
} | |
}); | |
} | |
} | |
} | |
).start(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment