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
Asked
Active
Viewed 2.4k times
18

Christopher Francisco
- 15,672
- 28
- 94
- 206
4 Answers
28
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

Thijs Mergaert
- 399
- 3
- 4
-
Can I use it for both: APIs below 11 AND above 11, or only for those below? – Christopher Francisco Oct 01 '13 at 14:58
-
Thank you, that saved lots of time. – sedran Mar 21 '14 at 22:37
-
4`ActionBarActivity` is now deprecated, use `AppCompatActivity` – camelCaseCoder Oct 16 '15 at 04:33
0
to use getSupportActionBar() you need extends ActionBarActivity like this http://antonioleiva.com/actionbarcompat-how-to-use/

everson
- 37
- 1
- 2
0
Sameera getSupportActionBar()
is the new way to get the ToolBar
. In fact, ActionBar
is now deprecated in Google Material Design.

camelCaseCoder
- 1,447
- 19
- 32

lgallard
- 462
- 3
- 10