Bug 5144 - AdapterView<T> cannot be subclassed
Summary: AdapterView<T> cannot be subclassed
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins ()
Version: 4.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-05-17 11:14 UTC by Jonathan Pryor
Modified: 2012-05-18 14:55 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Scratch.AdapterView.zip (10.02 KB, application/zip)
2012-05-17 11:14 UTC, Jonathan Pryor

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jonathan Pryor 2012-05-17 11:14:29 UTC
Created attachment 1908 [details]

AdapterView<T> cannot be subclassed because when the (abstract) Adapter property is overridden, the generated ACW doesn't contain a setAdapter() method.

To reproduce, build the attached project:

> obj/Debug/android/src/scratch/adapterview/MyListView.java(8,8): Error:
> scratch.adapterview.MyListView is not abstract and does not override abstract method setAdapter(android.widget.Adapter) in android.widget.AdapterView
public class MyListView

The cause is that our override detection logic when generating ACWs doesn't properly handle generic parameters.
Comment 1 Jonathan Pryor 2012-05-18 14:55:50 UTC
Fixed in 50d1eac6.