0

i am new to XamarinStudio to create Android App. Here the questions:

1 What are Manifest and AndroidManifest. How to create them or it is auto created?

  1. How to setUp a Default Activity for the app to display when it is first launch. In Windows Phone, the default Page is called MainPage.xaml.

  2. When I add another Activity into the project, do I have to declare it in Manifest or AndroidManifest?

Thanks

In Eclipse : The default Activity is setUp thru Intent-filter as



intent-filter 
                action android:name="android.intent.action.MAIN"
                category android:name="android.intent.category.LAUNCHER"
intent-filter

How to do it in XamarinStudio?

MilkBottle
  • 4,242
  • 13
  • 64
  • 146

2 Answers2

0

According the documentation on Developer.Android.com

The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code.

More info... http://developer.android.com/guide/topics/manifest/manifest-intro.html

  1. AndroidManifiest.xml is created automatically.
  2. The default activity for the App is the same name that you config when you create your Aplication, "activity_main.xml" or personalized name.

    Project_Name ->res ->layout ->activity_main.xml

http://www.mkyong.com/android/how-to-set-default-activity-for-android-application/

  1. When you add another activity in your project and if you need add to AndroidManifiest.xml, you need do that manually. What's the correct syntax to define an activity in manifest file
Community
  • 1
  • 1
SoldierCorp
  • 7,610
  • 16
  • 60
  • 100
0

When you build your Android app with Xamarin you can set the main activity in the actual activity itself.

When you open the code file for the activity you can put something like this:
[Activity(Label = "MyAppName", MainLauncher = true, Icon = "@drawable/icon", ScreenOrientation = ScreenOrientation.Portrait)]

jHogen
  • 123
  • 8