本文介绍了怎么使用兼容性库转换为整理碎片时做一下ListActivity / MapActivity?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用兼容性库转换现有应用程序的片段API。我读过你应该更新类,扩展活动,以现在使用FragmentActivity。这是对大多数情况下,但对于类,扩展ListActivity或MapActivity?什么是preferred的方式来处理呢?我希望有一个ListFragmentActivity或类似的规定,但我没有看到一个。

I'm converting an existing app to the Fragments API using the compatibility library. I've read that you're supposed to update classes that extend Activity to now use FragmentActivity. This is fine for most cases, but what about classes that extend ListActivity or MapActivity? What is the preferred way to handle this? I was hoping there was a ListFragmentActivity or something along those lines, but I don't see one.

推荐答案

有一个ListFragment:的

There is a ListFragment: http://developer.android.com/reference/android/app/ListFragment.html

有关MapActivity,不幸的是,你将需要继续使用;没有它片段API。

For MapActivity, unfortunately you will need to continue to use that; there is no Fragment API for it.

这篇关于怎么使用兼容性库转换为整理碎片时做一下ListActivity / MapActivity?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 16:30