操作栏片段活动 [英] Action Bar Fragment Activity

查看:171
本文介绍了操作栏片段活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我triying从actionbarsherlock我的应用程序迁移到谷歌的actionbarcompat,但ActionBarFragmentActivity不存在。我一定要使用ActionBarActivity或有另一种方式?

I'm triying to migrate my app from actionbarsherlock to Google's actionbarcompat, but ActionBarFragmentActivity does not exist. Do I have to use ActionBarActivity or there is another way?

在此先感谢, 迭戈。

推荐答案

看这里。这将帮助你。

<一个href="http://android-developers.blogspot.in/2013/08/actionbarcompat-and-io-2013-app-source.html">http://android-developers.blogspot.in/2013/08/actionbarcompat-and-io-2013-app-source.html

这是摘录:

扩展活动的类ActionBarCompat:    ActionBarCompat包含一个Activity类,所有的活动课的应该延伸:ActionBarActivity 的   这个类本身从FragmentActivity扩展,所以你可以继续使用碎片的应用程序。没有,你需要扩展ActionBarCompat片段类,所以你应该继续使用android.support.v4.Fragment为您片段的基类。

Extend Activity classes from ActionBarCompat: ActionBarCompat contains one Activity class which all of your Activity classes should extend: ActionBarActivity. This class itself extends from FragmentActivity so you can continue to use Fragments in your application. There is not a ActionBarCompat Fragment class that you need to extend, so you should continue using android.support.v4.Fragment as the base class for your Fragments.

这篇关于操作栏片段活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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