Skip to content

Instantly share code, notes, and snippets.

@AbreuY
Created September 26, 2018 20:52
Show Gist options
  • Save AbreuY/0e5889828ad20d2ffe823947407ba45d to your computer and use it in GitHub Desktop.
Save AbreuY/0e5889828ad20d2ffe823947407ba45d to your computer and use it in GitHub Desktop.
load files runOnUiThread
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