Tomek Kondrat · Dec 30, 2013 at 02:30 am

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!

Tomek Kondrat

eagleeyetom is an editor on XDA-Developers, the largest community for Android users. Tomek is the only Polish moderator on XDA Developers. He graduated from the University of Warmia and Mazury in Olsztyn with a degree in journalism and public communication in 2013. He's a big fan of football (not hand egg), post rock and cooking. A total addict of mobile technology, especially Android. Currently flashes dozens of custom ROMs on his OPO. View eagleeyetom's posts and articles here.
Jimmy McGee · Jul 31, 2015 at 06:00 am · no comments

OnePlus 2 Teardown, Major Android Vulnerability – XDA TV

The OnePlus 2 has been officially released. That and much more news is covered by Jordan when he reviews all the important stories from this week. Included in this week's news is the announcement of a serious security vulnerability on Android and be sure to check out the article talking about how easy it is to make your one Xposed Module. That's not all that's covered in today's video! Jordan talks about the other videos released this week on XDA...

XDA NEWS
Mario Tomás Serrafero · Jul 30, 2015 at 02:04 pm · 3 comments

What Do You Think About Fingerprint Scanners?

More and more phones are featuring fingerprint scanners, and with many promising developments and it being natively supported on Android M, we can soon expect to see them on smartphones everywhere. If done right, it is a useful feature that allows for quick unlocking and authorization. There are concerns regarding security, but nonetheless the industry seems to be embracing it with open arms. What do you think?

DISCUSS
Aamir Siddiqui · Jul 30, 2015 at 01:20 pm · no comments

What’s Next for Samsung and Its Flagships?

If we were to say that the Galaxy S6 was a leap of faith made by Samsung, we wouldn't be too wrong. After all, the device marked a definite change in how Samsung perceived the market and its own place in it, as it stood amongst the signs of decline which started with the critical reception of the Galaxy S5. To recap, the Samsung Galaxy S5 was criticized heavily for feeling more like a toy, rather than a premium flagship...

XDA NEWS