android execute code after 3 seconds
// delay execute function in android
// android execute a function after a few seconds
new Timer().schedule(new TimerTask() {          
    @Override
    public void run() {
        // this code will be executed after 2 seconds       
    }
}, 2000);