I see that you've submitted a similar question in a different forum thread, I'll repeat my answer here so that the community can see it as well.
You don't always have to inherit from Java.Lang.Object. For example, in our RadListView Getting Started Documentation
, there's a City class.
In that case, you can create and show a list of Cities without inheriting from Java Object:
Name = name;
Country = country;
I've attached a small, runnable, demo that shows this in action.
That said, there are times that you will need use Java Object
. In the case of the RadListView Grouping example
, you have to use it because you're implementing an Interface, IFunction
, in the CountryGroupDescriptor
To learn more about why this is the case, please read the Implementing Interfaces paragraph in the Android Callable Wrappers Xamarin documentation
To quote that documentation's opening summary:
Android code needs to execute a
or interface method which is
or implemented in managed code, Xamarin.Android needs to provide a Java proxy so that the method gets dispatched to the appropriate managed type. These Java proxy types are Java code which have the "same" base class and Java interface list as the managed type, implementing the same constructors and declaring any overridden base class and interface methods.
I hope I was able to clear this up for you, thank you for choosing UI for Xamarin!
Lance | Tech Support Engineer, Sr.
Telerik by Progress
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items