You can force the WINDOW_STATE_CHANGED event from the decor view to declare an ActionBar header. This will also cause TalkBack clear the focus of accessibility, so you should only call it when the main content of the application changes.
getWindow().getDecorView() .sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
alanv source share