Bengi Besceli
Bengi Besceli

Reputation: 3748

How to run Main.axml?

Hello I installed Xamarin on Visual Studio 2015
and want to create an Android application.

I want to run the steps on this page : https://msdn.microsoft.com/en-us/library/mt488769.aspx
(File New Project/Templates/Visual C#/Cross Platform/Blank App (Native Portable))

When I debug this the blank project,
this window opens at startup :
default window


But I want to run the below window (Main.axml) located at Reources/layout

wanted window

What am I missing ?
Thanks in advance.

Upvotes: 1

Views: 625

Answers (2)

Lee Yeong Guang
Lee Yeong Guang

Reputation: 146

Debug it on your physical devices or use GenyMotion Emulator, this built in emulator is ugly...

Upvotes: 1

Akshay Kulkarni
Akshay Kulkarni

Reputation: 729

    public class MainActivity : Activity
{
    protected override void OnCreate(Bundle bundle)
    {
        base.OnCreate(bundle);

        // Set our view from the "main" layout resource
        SetContentView(Resource.Layout.Main);
    }

}

Check for the line

SetContentView(Resource.Layout.Main);

Upvotes: 2

Related Questions