runOnUiThread(new Runnable() {
@Override
public void run() {
//Your code
}
});
You have to execute the code in the UI Thread
runOnUiThread(new Runnable() {
@Override
public void run() {
//Your code
}
});
You have to execute the code in the UI Thread