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.
Emil Kako · Apr 17, 2015 at 01:22 pm · 3 comments

What Do You Do with All of Your Old Photos?

Smartphone cameras have advanced so tremendously over the past few years that they have almost completely replaced point and shoot digital cameras for the most of us. Furthermore, since our smartphones are always with us, the majority of us end up taking tons of photos throughout the lifespan of our devices. But what happens to all the old photos you take? Do you store them on an external hard-drive or keep them backed up to an online cloud service like Flickr? Let us know what your favorite way of storing old photos is and why.

DISCUSS
Faiz Malkani · Apr 17, 2015 at 01:04 pm · 1 comment

Diving into the April 2015 Material Design Update

Before the release of Android 5.0 Lollipop, the Holo Design guidelines served as the official reference for Android design, right from IceCream Sandwich to KitKat. However, updates to the guidelines were few and far between, leading to a lack of synchronization between Android design and current UI/UX trends. Google seems to have learned from their mistake the last time around, and earlier this week, a significant update was released for the Material Design guidelines, marking the second revision in less...

XDA NEWS
Mathew Brack · Apr 17, 2015 at 12:37 pm · 6 comments

New Cyanogen Partnerships Bring Privacy Concerns

New Privacy concerns have emerged regarding Cyanogen’s latest announcements, primarily the inclusion of email app Boxer and that of a multitude of Microsoft apps, including Bing services, Skype, OneDrive, OneNote, Outlook, and Microsoft Office. The concerns arise when you look at both announcements together. At face value they may appear to be the beginning of Cyanogen’s plan to “take Android away from Google,” however there is certainly something more nefarious occurring. Along side the partnership with Microsoft, Cyanogen also recently announced...

XDA NEWS
Share This