Cross Platform - Developing A Simple Android App Using Visual Studio With Xamarin - Part One


This article will explain about developing a simple basic app for Android using Xamarin with Visual Studio 2015.


HardwareWindows/Mac with 8GB RAM
Software01. Windows 1002. Visual Studio 2015 with Xamarin installed03. Visual Studio Emulator for Android (or) Google x86 Emulators.

Developing a simple basic app for Android Phone

Open Visual Studio installed with Xamarin and click on New Project >> Visual C# >> Android >> Blank App (Android). Name the app, followed by where the solution file has to be located and click on "OK".

Here is the new project created for demoandroid which I have named. The default page of GettingStarted.Xamarin will help you to have some basic knowledge about what we can do with Xamarin, how to build an app using Xamarin and running the same Xamarin app.

Under Solution Explorer, go for Resources à Layout à Main.axml

You can find two panes below, Designer and Source. Designer will give you a graphical view of how your app will be and under source you can find the code for whatever is available on the Designer.

Go to ToolBox and select the tool “Text(Large)”, drag and drop it on the Graphical pane as shown below.

Select the Text (Large) from Designer pane and go to its properties now. Select text and rename it for Enter a Phoneword,

Move back to the Toolbox again and search for Plain Text, drag and place it under Text (Large) on the designer pane.

Move to the properties of the Plain Text and select id where you can find the id as @+id/editText1 as shown below.

Rename it for @+id/PhoneNumberText and change the text property for 1-855-XAMARIN,

Drag a button from the toolbox now and place it below the Plain Text tool on the designer surface.

Now change the id for the Button as @+id/TranslateButton and change the text property for Translate

Drag a second button from the ToolBox and place it under Translate Button.

Select the new button which was dragged towards the designer surface, change the id and text value for it as shown below:

Id - @+id/CallButton

Text - Call

Here is the UI of the button changed for Call.

Save the work using Ctrl + S on your Visual Studio now.

Keep following my next article in which I will be working on adding code for translating from alphanumeric to numeric.

Other articles of mine on Cross Platform using Xamarin and Azure can be accessed with help of the below links:

  • Click here for Cross Platforms - Reuse The Code And Reach Your Audience On All Platforms - Part One.
  • Click here for Cross Platforms - Set Your Environment With Visual Studio And Xamarin - Part Two.
  • Click here for Cross Platforms - Creating Mobile Apps With Backend Using Azure - Part Three.
  • Click here for Cross Platforms - Managing Azure Mobile Backend and Dealing with NuGet Packages for Native Platforms.

Similar Articles