• 5,605,676
    REGISTERED
  • 48,706
    ONLINE NOW

Modified ViewPager Library Reduces the Size of Your Application

Difficulty:
1
Modified ViewPager Library Reduces the Size of Your Application

The ViewPager class is commonly used in Android, starting from Honeycomb onwards. You can see it in action in the Google Play Store, where you can browse applications or games by category, by simply swiping left or right.

These applications are also often created to be compatible with older versions of Android such as Froyo. However, not many devices run Froyo anymore, as more than 75% of devices run Honeycomb or greater. Keeping compatibility with older versions forces the developer to make the APK bigger and possibly slower.

XDA Senior Member gade12 modified the Google Library to reduce its size by removing compatibility libs. Gade12 removed all unrelated code before API level 11. The ViewPager library after modification is much smaller, and it takes just over 120 KB. Using it in your application will reduce the amount of code, size and possibly improve the speed of the application. Of course, this breaks the compatibility with older Android devices, but you still have a choice between the original library from Google and the modified one by gade12.

If you are an app developer and want to try modified ViewPager library in one of your projects, make your way to the original thread and grab the compiled Java Archive. You can see ViewPager class in action in the following video:

_________
Want something on the XDA Portal? Send us a tip!
Advertisment
Advertisement

XDA TV: Most Recent Video

Buy/Sell on Swappa