Running principle of mono for androi Development

Source: Internet
Author: User

Android Developers believe that Java is the first choice,. for net developers, to use C # for development on the andriod platform, Mono provides the corresponding development platform for implementation. mono for andriod is dedicated.. Net developer-designed Android mobile development platform.

Mono for andriod official documentation: http://docs.xamarin.com/android

When you compile a mono for andriod application, there are three main steps:

1. The source file is a pre-compiled part. aresgen.exe runs the Resource Directory, such as resource. Designer. CS, UI file, images, and other resource files.

2. compile it into a managed. Net or mono application assembly

3. Create the andriod installation package: generate an APK file and package it with the mandroid.exe tool.

Project File description:

There are two folders: assets and resource. These are all files.

Assets Folder: All files related to this program can be stored in this folder.

But what is different from the resource folder is that any file in the resource will be in the resource. designer. the corresponding ID is generated in the CS folder. This ID is unique and the program uses this ID to reference this file.

In addition, there is a string. xml file in the value folder.

String. xml resource dictionary

In the string. xml file, it exists as a key-value pair.


In the resource. Designer. CS file, both hello and applicationname in the file will automatically generate a unique ID.


The reason why all the corresponding IDs are generated in the resource is that it will not be so troublesome when the program is modified.

For example, to apply a value like hello. world, we can write it out.

Resource. String. Hello, you can get the value of name = "hello" in the string file in the resource folder.

If you want to modify it, select another ID name.

Reference Value in the layout file main. axml


The text of the button is shown as follows:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.