使用FragmentActivity getSupportActionBar [英] getSupportActionBar using FragmentActivity
问题描述
我使用的片段活动的一个项目,但它似乎V4支持 FragmentActivity
不具有 getSupportActionBar()
的方法,我需要使用一个支持才能使用 android.support.v7.app.ActionBar
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
推荐答案
在 ActionBarActivity
不支持您所需要的方法,并且是的子类FragmentActivity
。参见:<一href="http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html">http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html
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
这篇关于使用FragmentActivity getSupportActionBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!