Sunday 26 May 2013

getactionbar in fragment

I  call getactionbar in fragment but the function is not recognized. I search on Google and the solution is very simple.



ActionBar actionBar = getActivity().getActionBar();
   actionBar.setDisplayHomeAsUpEnabled(true);
 
 
 
NOTE 
You can control the behaviors and visibility of the action bar with the ActionBar APIs, which were added in Android 3.0 (API level 11). Remember!

No comments:

Post a Comment