7

I'm look for the easiest way to get an ActionBar instance from a Fragment using AppCompatLibrary and API 8.

Already tried things like

getActivity().getSupportActionBar() 

but no luck.

2t0m
  • 165
  • 1
  • 13

1 Answers1

23

Try to cast it:

((YourActivity)getActivity()).getSupportActionBar()
BArtWell
  • 4,176
  • 10
  • 63
  • 106