Introduction
Xamarin is a platform to develop the cross-platform and multi-platform apps. (Ex. Windows phone, Android, iOS). In the Xamarin platform, the code sharing concept is used. In Xamarin studio, Visual Studio is also available. Viewing the contacts from your Android phone is possible, using this Xamarin Android app.
Prerequisites
- Visual Studio 2015 Update 3
The steps are given below, which are required to be followed in order to view the contacts in Xamarin Android app, using Visual Studio 2015.
Step 1
Click File--> select New--> select Project. The project needs to be clicked after opening all the types of projects in Visual Studio
or clicking (Ctrl+Shift+N).

Step 2
After opening a New Project, select Installed-->Templates-->Visual C#-->Android-->choose the Blank app (Android).
Now, give your Android app a name (Ex:sample) and give the path of your project. Afterwards, click OK.

Step 3
Now, go to Solution Explorer. In Solution Explorer, get all the files and the sources in your project. Now, select Resource-->Layout-->double click to open main.axml page. To write XAML code, you need to select the source.
If you want design, choose the Designer Window and you can design your app.

Step 4
After opening main.axml, the file will open the main page designer. You can design the page, as per your wish.

Now, delete the Linear layout and default hello world button.
Go to the source panel and you can see the button coding. You need to delete it.
After deleting XAML code, now delete C# button action code.
Go to MainActivity.cs page. You need to delete the button code.
Step 5
After deleting the code, you need to rename Main.axml file (rename is called ContactItemView.axml).

Step 6
In this step, write the TextView code in your ContactItemView.axml page, mentioned below.

CantactItemView.axml
- <?xml version="1.0" encoding="utf-8"?>
- <TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:padding="15dip" />







Madhanmohan DevarajanPosted Oct 27, 2016, 10:43 AM
Useful article for the beginners