Search code examples
androidactionbarsherlockandroid-actionbarsidebar

How to move ActionBar when sidebar opens?


I have a SideBar in my android app which opens when the user clicks on a button. But in the activites which contain ActionBar too, when the SideBar opens, the ActionBar stays at the top while the rest of the activity moves offscreen. So how can the ActionBar be also moved offscreen when the sidebar opens?


Solution

  • One solution would be to call ActionBar.hide() when you open the sidebar. The other option would be to give the ActionBar a sliding animation.