Bug 18542 - Android Spinner ItemClick Event throws exception
Summary: Android Spinner ItemClick Event throws exception
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.2.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-03-23 14:18 UTC by Ryan Alford
Modified: 2015-08-21 18:08 UTC (History)
4 users (show)

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


Attachments
SampleTest (18.01 KB, application/zip)
2014-03-24 03:02 UTC, Sadik Ali
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 for Bug 18542 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Ryan Alford 2014-03-23 14:18:49 UTC
Description of Problem: When using a Spinner in an Android application, if you try to subscribe to the ItemClick event, the runtime throws an exception.


Steps to reproduce the problem:
1. Add a spinner to a view and give it a name.
2. Subscribe to the ItemClick event of the Spinner.
3. Run the application


Actual Results:
Exception thrown: "setOnItemClickListener cannot be used with a spinner."

Expected Results:
Either the event should be implemented, or it shouldn't be available in code completion.

How often does this happen? 
Everytime

Additional Information:

=== Xamarin Studio ===

Version 4.2.3 (build 60)
Installation UUID: 0bc2fcb3-22a5-4be7-8048-8e368862b0a7
Runtime:
	Mono 3.2.6 ((no/9b58377)
	GTK+ 2.24.23 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302060000

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.iOS ===

Version: 7.0.7.2 (Starter Edition)
Hash: fb4bc7b
Branch: 
Build date: 2014-17-02 17:43:23-0500

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.12.1 (Indie Edition)
Android SDK: /Users/ryan/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Build Information ===

Release ID: 402030060
Git revision: 30c4afc300c2a39ec5300851357ce02e49dd217e
Build date: 2014-03-05 22:09:33+0000
Xamarin addins: f8a9589b57c2bfab2ccd73c880e7ad81e3ecf044

=== Operating System ===

Mac OS X 10.9.2
Darwin ryans-mbp 13.1.0 Darwin Kernel Version 13.1.0
    Thu Jan 16 19:40:37 PST 2014
    root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Comment 1 Sadik Ali 2014-03-24 03:00:09 UTC
I am able to reproduce this issue, I have implemented spinner with subscribe to the ItemClick event and noticed that it throws exception ""setOnItemClickListener cannot be used with a spinner."

Screen cast: http://screencast.com/t/P5bPLWm6z6qL
Exception log: https://gist.github.com/Sadik1/e69c6efb99b14a2ac9ce

Build info:

=== Xamarin Studio ===
Version 4.2.3 (build 60)
Installation UUID: ce3f5199-e126-42fd-bc8a-6a96370af9ab
Runtime:
	Mono 3.2.6 ((no/9b58377)
	GTK+ 2.24.23 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302060000

=== Xamarin.Android ===
Version: 4.12.1 (Business Edition)

=== Build Information ===
Release ID: 402030060
Git revision: 30c4afc300c2a39ec5300851357ce02e49dd217e
Build date: 2014-03-05 22:09:33+0000
Xamarin addins: f8a9589b57c2bfab2ccd73c880e7ad81e3ecf044

=== Operating System ===
Mac OS X 10.9.0
Darwin mac109s-Mac-mini.local 13.0.0 Darwin Kernel Version 13.0.0
    Thu Sep 19 22:22:27 PDT 2013
    root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
Comment 2 Sadik Ali 2014-03-24 03:02:13 UTC
Created attachment 6395 [details]
SampleTest