开发者

How to use the fragments backport?

Could somebody explain how I can use the Fragments backport? I downloaded the compatibility package 开发者_StackOverflow中文版with the manager, but I can't find the library that I have to link to my project to use fragments.

Thank you


In your SDK installation directory, you will find extras/android/compatibility/v4/android-support-v4.jar. Add this to your project's libs/ directory, and if you are an Eclipse user, also add it to your build path.


One thing though. There is a bug in the "stock v4" android jar which is pretty annoying - you cannot receive result of any activity started from within fragments, which makes it pretty much unusable for a lot of problems. There is however a fixed version of the jar which solves the problem (until v5 is in place I guess):

http://dev.polidea.pl/ext/android-support-v4-with-onActivityResult-fix.jar

And the issue is described here:

http://code.google.com/p/android/issues/detail?id=15394

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜