Skip to content Skip to sidebar Skip to footer

Avoiding A Nullreferenceexception When Creating A Custom Android Ui Element From Subclassed Textview

A couple of firsts here - first Android app and first time using MonoDroid (I've got lots of experience with C# .NET). In my user interface I want to draw a border around a TextVi

Solution 1:

Mono for Android lowercases the namespace name when generating the Java Android Callable Wrappers for use by Android and layout XML files.

Consequently (as noted in the previous answer), you need to use mbta.BorderedTextView, not MBTA.BorderedTextView.

The Mono for Android documentation discuses using custom views in a layout, which addresses this scenario.

Post a Comment for "Avoiding A Nullreferenceexception When Creating A Custom Android Ui Element From Subclassed Textview"