PDF for offline use
Sample Code:
Related SDKs:

Let us know how you feel about this

Translation Quality


last updated: 2018-02

The GridViewPager sample demonstrates how to implement the 2D picker navigation pattern for Android Wear.

Example screenshot of GridViewPager on a square display

First add the Xamarin Android Wear Support NuGet package to your project.

The layout XML looks like this:

< xmlns:android=""
    android:keepScreenOn="true" />

Create a GridPagerAdapter (or subclass such as FragmentGridPagerAdapter to supply views to display as the user navigates.

The sample adapter shows how to implement the required methods, including overrides for RowCount, GetColumnCount, GetBackground, and GetFragment

Wire up the adapter as shown:

pager.Adapter = new SimpleGridPagerAdapter (this, FragmentManager);

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.