A Preliminary Study on mono for Android 4.2

Source: Internet
Author: User
Tags visual studio 2010
The recently released mono for Android 4.2 allows users to use the xamarin design interface to create beautiful and concise user interfaces. Now, you can use drag-and-drop operations to process any UI elements on the Visual Studio XAML design interface.

The recently released mono for Android 4.2 allows users to use the xamarin design interface to create beautiful and concise user interfaces (UIS ). Now, you can use drag-and-drop operations to process any UI elements on the Visual Studio XAML design interface. In addition, monodevelop 3.0 is available, which is an open-source integrated development environment (IDE) that can run on Linux, Mac OS X, and Windows systems.

To achieve objective analysis results, we will test monodevelop and Visual Studio 2010 in 32-bit and 64-bit Windows 7 systems.

Install

Xamarin uses a comprehensive multi-in-One Installation tool to ensure the installation process is simple. The first step of the evaluation plan is to download a local setup.exe file from the xamarin website, which will automatically detect other components required for installation. If you have installed an earlier version of Mono droid in the system, you must uninstall it before running the installation program again. There is no need to uninstall the old version of Android SDK, but the installer will automatically download and install another version. Therefore, it is best to delete it for hard disk space saving.

During the installation process, you need to retain at least 1 GB of hard disk space, of which the download content is about 600 mb, and the remaining space is used for file extraction and installation. After it is started, the installer automatically checks the applicable version of. net, stops other work when necessary, downloads the version, and installs it. In addition, the installation tool may download and install the latest Android SDK (for testing in the device simulator ). The android SDK must be supported by the Java developer kit (JDK). Therefore, if the toolkit is not installed in your system, the installation program will be downloaded and installed. After the installation is complete, we have a full set of Visual Studio plug-ins and the latest version of monodevelop.

Create and test an android Program

If you are familiar with programming on the Android platform, the entire workflow will become more convenient. Most of the basic concepts are unrelated to Activity events and other elements in Windows programming, so friends who are just getting started may feel a little troubled. However, the good news is that the xamarin website provides a large number of application examples, and such resources can be easily obtained on other websites. Currently, mono for Android has a very large user base. The problems faced by everyone in practical applications can generally be solved in real time by means of email groups and chat tools.

Whether it's monodevelop (see Figure 1) or Visual Studio (see figure 2), you need to select and create a new project at the first startup, in this way, we have an application prototype that can run in the simulator at any time. This is basically a simple click count application. Each time a user clicks a button, the Count increases. The user interface has a separate button and lists the Code required to update tags.

Monodevelop 

Visual Studio

In this release, xamarin made a big change to the design interface, which was the first time they tried to operate the user interface in the form of drag and drop. Figure 3 shows how to double-click the main. axml file in Solution Explorer of Visual Studio. Although a few projects seem unfamiliar, the toolbar actually contains all the gadgets that can help developers so far. Figure 4 shows the design interface in monodevelop. The main task of creating a UI for Android is to select a layer and drag the corresponding tool into it. This allows the Android operating system to maintain control when the device location is changed.

Main. axml file in Solution Explorer of Visual Studio 

Design Interface in monodevelop

It may take a little longer to start the simulator for the first time. You need to wait patiently because the mono running time and the application APK must be loaded one by one. After the startup process is complete, we can access the debugging function interface that is very similar to that of Windows programs. Figure 5 the 28th rows in the local window show the broken point set. We can see that the current Count value is 1. The preview version of mono for Android only allows you to deploy simulators (see Figure 6), but it is sufficient for product inspection.

Breakpoint set displayed on Line 1 in the local window

Simulator

Overview 

In this mono for Android release, we really have an integrated development environment, and both monodevelop and Visual Studio contain the function of designing custom UIS. This was not possible in earlier versions. Prior to this, we could only create a personal UI by programming or using external tools. With the integration of UI creation and debugging functions, we have almost all the powerful tools necessary to create Android applications in Linux, Mac OS X, windows, and other operating systems.

Link: http://www.developer.com/ws/.net-development-mono-for-android.html

Related Recommendations

  1. Monotouch and mono for Android third-party Libraries
  2. Monogame: IOS, Android, and WP. Net game development tools
  3. Developing Android applications with. Net: mono for Android 4.0 Overview
  4. Official Website: http://xamarin.com/
Related Article

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.