使用FragmentActivity getSupportActionBar [英] getSupportActionBar using FragmentActivity

查看:711
本文介绍了使用FragmentActivity getSupportActionBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆