Preview 13

API Changes


In response to user feedback, we have implemented a new approach to binding thejava.lang.CharSequence interface exposed by Android. Most of the Android API is exposed asCharSequences instead of java.lang.String to support formatted text. SpannableString and SpannedStringare a couple of CharSequence implementors exposed in Android.Text to support this capability.

Our new binding approach is to produce an overloaded API. Where the Android API exposes methods withCharSequence parameters, we provide overloaded methods for string and Java.Lang.ICharSequencevariants of the method signature. For properties and methods with CharSequence return values, we had to create alternatively named elements. For example, Android.Widget.TextView now has "overloaded"TextView.Text and TextView.TextFormatted properties:

public string Text { get; set; } 
public Java.Lang.ICharSequence TextFormatted { get; set; }

This means that you can now do things like:

EditText editText = new EditText (this);  
string text = editText.Text;

without have to use Convert.ToString() or object.ToString() to get a string value as with the previousIEnumerable<char> implementation. However, if you want to set or manipulate formatted text in the view, you will have to use the TextFormatted property now.

General Enhancements

Mono.Android.dll Moved to Debug Shared Runtime Packages

In addition to the regular shared runtime used for debug builds, there are now target version specific ones that contain Mono.Android.dll. This dramatically reduces the size of debug .apks, resulting in much faster deploys, making the change/deploy/test cycle much quicker. Linking is now turned off by default for debug builds.

Versioned Debug Shared Runtimes

Shared runtimes are now versioned, so the IDE can detect if you are running an old shared runtime and automatically remove it. This means you should never need to manually remove the shared runtime again.

Visual Studio Plugin Enhancements

Debugging Enhancements

  • Breakpoints in class libraries should now function as expected.
  • Disabled breakpoints are now skipped.
  • Starting the debugger via "Start New Instance" now works.

Bug Fixes

672350 Linker: Mono.Android.mdb used by another process
673178 Link out [MonoTodo] and friends
657617 Monodroid project will not debug
657877 Deploying application to emulator is very slow in P9
668504 Change signature of Window.SetFormat to use Android.Graphics.Format enum
670361 Mono Runtime on Android v2.3 Research Bug
672325 Assets have filename case changed during compilation
672613 Support mixed-cased package names.
641502 Debugger doesn't stop at breakpoints in class libraries
671108 Problem with deactivate breakpoint on Preview 12.
661858 Allow the use of Jar files to be used in MonoDroid.
666610 DirectoryNotFoundException when compiling - Preview 1
665893 Application crashes when generic method that calls another generic method is called.
670839 Building a Java file fails when encoding is not ANSI

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.