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

Adding layouts

There are four different and preprogrammed layouts that you can use in Xamarin Studio. Layout means a special ordering of elements inside the activity. These layouts are Relative, Linear, Table, and Tabbed Layouts. In this section, we will learn how to take advantage of each of them.

Getting ready

Create a new Android project named Layout for experiencing them.

How to do it...

  1. LinearLayout:

    Let's now look at how to add new elements in it to see how it looks. The next code sample shows three linear layouts in order to display three columns followed by three lines. The first linear layout contains the two other ones. It's the default one. After this, the second one owns android: orientation="horizontal" while the second one has the same ...

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