Interested in the difference in terms of the support.v4.fragment code from app.fragment Are they connected differently?
1 answer
This is the same, with one exception:
There is SupportLibrary , which supports Android functionality for older versions. In other words, support.v4.fragment supported with API 4, up to the last.
and app.fragment is API 11 and higher. If you use support.v4.fragment , then fragmentManager must also be support - otherwise an error will be output at the semantics level.
I summarize - the difference in the support of the old versions.
- oneBefore writing the answer, look at the documentation. app.fragment not with version 5 android available. it is available from API11 - pavel163
- @ pavel163 didn’t I specify 11 api saying that I don’t remember exactly, with 2.0 or 3.0? Yes, support with 4 support, but fragments from 11 - which was indicated. What is the problem? - Silento
- 2You wrote: "and app.fragment is 5.0 and higher." - pavel163
- What's the Difference? I now have all the fragments built on v4, I need to rewrite them on the app. Fragment - Martinez Toni
- If you support an API less than 11 then you do not need to rewrite. If you have API more than 11 you can rewrite, you can leave. At the moment you are pulling more classes and methods from the library. Now Support library can be broken into small parts. And if you used app.fragment, you could not connect to the project support.v4.fragment. From this, you would have reduced the number of methods and the weight of the application. - pavel163
|