Wear gist#4: How to use a simple a GridViewPager with a FragmentGridPagerAdapter

It is very simple to use the FragmentGridPagerAdapter in your Android Wear App.

You can build a new CardFragment with the default layout including title, text and icon using the method: CardFragment.create(page.mTitle, page.mText, page.mIconId)
Also you can provide a background overriding the getBackground(int row, int col) method in your adapter.

Very useful the class ImageReference which provides a reference to an image

Here a small gist

Comments

Popular posts from this blog

AntiPattern: freezing a UI with Broadcast Receiver

How to centralize the support libraries dependencies in gradle

NotificationListenerService and kitkat