Reputation: 13283
When switching from support library v4 to v13 I expected the method count number to go down because now all the methods which are in the SDK version 13+ don't have to be in the support jar anymore. Well I checked what happens when I exchange the v7 against the v13 and here are the method count numbers per package.
When using android-support-v4:
android.support: 10117
v4: 6402
v7: 3712
and when using android-support-v13:
android.support: 10203
v13: 82
v4: 6406
v7: 3712
Why are there still all methods from v4 (+4 additional ones?!) included in the v13 version? Reading http://developer.android.com/tools/support-library/features.html I thought the version number relates to the API level number.
Upvotes: 1
Views: 150
Reputation: 1007359
When switching from support library v4 to v13 I expected the method count number to go down because now all the methods which are in the SDK version 13+ don't have to be in the support jar anymore.
No. support-v13
has everything that is in support-v4
, plus additional classes that are only relevant for apps with a build target of API Level 13+.
Why are there still all methods from v4 (+4 additional ones?!) included in the v13 version?
Since the Android Support package pre-dated widespread Android use of things like Maven and Gradle, with transitive dependency support, Google elected to have support-v13
be a superset of support-v4
. If they had to do it over again, they might have made support-v13
be a small JAR that depended upon support-v4
.
Upvotes: 2