You can use a Handler
to delay certain actions.
Handler h = new Handler();
h.postDelayed(new Runnable() {
@Override
public void run() {
// DO DELAYED STUFF
getActionBar().hide();
}
}, delaytime); // e.g. 3000 milliseconds
The actions you take inside the
run()
method will be executed after the delay-time you set.