using handler runnable for refresh android code example
Example: using handler runnable for refresh android
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
//Do your work
}
},500);