支持-v4.app.fragment和app.fragment之间的区别? [英] Difference between support-v4.app.fragment and app.fragment?

查看:170
本文介绍了支持-v4.app.fragment和app.fragment之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的碎片,并有一个问题:
当我更新我的SDK工具,去创建一个项目(分= api8,默认的),我发现在我引用的库Android的支持,v4.jar。

I am new to fragments and had a question: When I updated my SDK tool and went to create a project(min = api8, the default one), I noticed the android-support-v4.jar in my Referenced Library.

当我伸出我的课,并试图使用片段类,我发现有2一是android.app.Fragment等是android.support。 v4.app.Fragment。什么是这两者之间有什么区别?

When I extended my class and tried to use the Fragment class, I found out there are 2. One is android.app.Fragment and other is android.support.v4.app.Fragment. What is the difference between these two?

推荐答案

如果你正在为Android开发3+,你可以使用app.Fragment。

If you're developing for Android 3+, you can use app.Fragment.

然而,在3,碎片还不存在。这就是支持库的用武之地。它提供了片段旧版本的Andr​​oid。

However, in 3-, Fragments didn't exist yet. That is where the support library comes in. It provides Fragments for older versions of Android.

又见此链接

这篇关于支持-v4.app.fragment和app.fragment之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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