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

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


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


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:
Status:
RESOLVED FIXED

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

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.