Introduction
Xamarin is a platform to develop cross-platform and multi-platform apps (for example, Windows phone, Android, iOS). In the Xamarin platform, the code sharing concept is used. In Xamarin Studio, Visual Studio is also available.
Xamarin is a platform to develop cross-platform and multi-platform apps (for example, Windows phone, Android, iOS). In the Xamarin platform, the code sharing concept is used. In Xamarin Studio, Visual Studio is also available.
Prerequisites
- Visual Studio 2015 Update 3.
The steps, given below are required to be followed in order to get pluralized values in the 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 click (Ctrl+Shift+N).
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 click (Ctrl+Shift+N).
Step 2
After opening the 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
Next go to the solution explorer. All the files and sources in your project are in solution explorer.
Next Select Resource-->Layout-->double click to open main.axml page. You want to select source to write the xaml code.
You want to choose the designer window so you can design your app.
Next go to the solution explorer. All the files and sources in your project are in solution explorer.
Next Select Resource-->Layout-->double click to open main.axml page. You want to select source to write the xaml code.
You want to choose the designer window so you can design your app.
Step 4
After opening, the main.axml file will open the main page designer. In this page choose which type you want so you can design this page.
Next Delete the Default hello world button.
Go to the source panel and you can see the button coding. You will delete it.
After deleting the xaml code, next delete the C# button action code.
Go to the MainActivity.cs page. You will delete the button code.
Step 5
Now, go to the toolbox Window. In the toolbox Window, get all the types of the tools and controls.
You need to go to the toolbox Window. Now, scroll down and you will see all the tools and controls.
You need to drag and drop the Button.
Step 6
Now, go to the properties Window. You need to edit the Button Id Value and Text Value (EX: android:id="@+id/MyButton"android:text="Hello" ).
Now, go to the properties Window. You need to edit the Button Id Value and Text Value (EX: android:id="@+id/MyButton"android:text="Hello" ).
Step 7
In this step, go to the Main.axml page Source Panel. Note, the Button Id value.
Main.axml
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:minWidth="25px"
- android:minHeight="25px">
- <Button
- android:id="@+id/MyButton"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="Hello" />
- </LinearLayout>


Delpin Susai RajPosted Nov 2, 2016, 9:33 PM
Thank you Patel
Bhavik PatelPosted Nov 2, 2016, 8:57 PM
Simple and well explained