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 ...

Get Xamarin Studio for Android Programming: A C# Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.