使用FragmentActivity getSupportActionBarFragmentActivity、getSupportActionBar

2023-09-12 02:07:44 作者:抢我辣条还想跑ヘ

我使用的片段活动的一个项目,但它似乎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 。参见: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

 
精彩推荐
图片推荐