Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getSupportActionBar using FragmentActivity

I'm using fragment activity on one project, but it seems v4 support FragmentActivity doesn't has getSupportActionBar() method, and I need to use the support one in order to use android.support.v7.app.ActionBar

like image 505
Christopher Francisco Avatar asked Oct 01 '13 14:10

Christopher Francisco


2 Answers

The ActionBarActivity does support the method you require, and is a subclass of FragmentActivity. See: http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html

like image 95
Thijs Mergaert Avatar answered Nov 12 '22 04:11

Thijs Mergaert


Just use this.getActionBar() to get action bar

like image 44
Chetan Pawar Avatar answered Nov 12 '22 04:11

Chetan Pawar