O'Reilly logo

Xamarin Studio for Android Programming: A C# Cookbook by Mathieu Nayrolles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Populating the spinner

The spinner is the name given by Android developers to the classic drop-down list. Drop-down lists, or drop-down menus, are very useful for choosing from a vast list of choices. When deactivated, they only show the current choice, and we show all the possible choices.

Getting ready

In order to follow this recipe, you will have to create yet another project in the current solution. Name this project PopulateSpinner.

How to do it...

  1. Open the main.xaml file of your newly created project and modify it so it looks like the following:
    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required