Bug 17531 - DialogInterface.ButtonPositive reported as deprecated
Summary: DialogInterface.ButtonPositive reported as deprecated
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.10.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-01-31 04:28 UTC by René Ruppert
Modified: 2014-01-31 13:40 UTC (History)
3 users (show)

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

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 INVALID

Description René Ruppert 2014-01-31 04:28:07 UTC
DialogInterface.ButtonPositive is reported deprecated (same for negative button) but according to the documentation this is not deprecated but actually added new:

http://developer.android.com/reference/android/content/DialogInterface.html#BUTTON_POSITIVE
Comment 1 narayanp 2014-01-31 05:42:49 UTC
We are also observing same behavior at
http://developer.android.com/reference/android/content/DialogInterface.html#BUTTON_POSITIVE

Screencast: http://screencast.com/t/Pfo5yGrC
Comment 2 Jonathan Pryor 2014-01-31 12:58:25 UTC
> DialogInterface.ButtonPositive is reported deprecated

The reason it's deprecated is because there is a dedicated enum for it, as mentioned in the message, and the enum should be preferred:

> This constant will be removed in the future version.
> Use Android.Content.DialogButtonType enum directly instead of this field.

Xamarin.Android doesn't directly mirror the Java types (e.g. adding events, prefixing interface names with 'I', PascalCasing members), and replacing 'static final const int' members with enums is yet another change that we make.
Comment 3 René Ruppert 2014-01-31 13:40:55 UTC
I see. The problem is: if you use Intellisense and type "DialogInterface." it will only show "[deprecated] The identifier for the positive button".
However when hovering "DialogInterface.ButtonPositive" the full message with the additional info about the enum becomes visible.