Solved it by using
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
getSupportActionBar().hide();
}
}, 1000);