Bug 9808 - PorterDuff.Mode is missing definition for Add and Overlay
Summary: PorterDuff.Mode is missing definition for Add and Overlay
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 4.6.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-01-26 17:24 UTC by Benny
Modified: 2013-01-28 05:15 UTC (History)
2 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 Benny 2013-01-26 17:24:36 UTC
intro:
-----

When I try to use the Add or Overlay PorterDuff.Mode*, they do not appear in the intelligence pop-out.
on build I get the same error for both: 

`Android.Graphics.PorterDuff.Mode' does not contain a definition for `Add/Overlay'

reproduce:
---------

1) Create a new Mono for Android project.

2) add 'using Android.Graphics;' to your activity/class.

3) Add the following lines in OnCreate: 

  var add = PorterDuff.Mode.Add;
  var overlay = PorterDuff.Mode.Overlay;

Notice that Monodevelop gives an error on .Overlay, 
but doesn't give an error on .Add, it misinterprets it for IMenuItem.Add (…).

4) Build and get the above mentioned errors.


*I also tried all the other modes and those are defined.

info:
----

MonoDevelop 3.1.1
Runtime:
	Mono 2.10.9 (tarball)
	GTK 2.24.10
Mono for Android: 4.4.54
Monotouch: 6.0.8
Build information:
	Release ID: 30101000
	Git revision: 5d928ec4f9d5864b4db04a1301b8a8649b43fb9d
	Build date: 2012-12-14 19:11:30+0000
Operating System:
	Mac OS X 10.8.2
Comment 1 Atsushi Eno 2013-01-28 05:15:30 UTC
Hello,

Interestingly, Android SDK reference has some issue on their documentation page that PorterDuff.Mode members lack "API Level" part.

As this bug report says,
http://code.google.com/p/android/issues/detail?id=29823

PorterDuff.Mode.ADD, SCREEN, and OVERLAY were added in API Level 11. Hence they don't exist in earlier API Levels. Current version of Mono for Android defaults to the API Level to 8, so you won't see those members unless you change the API Level in the project properties. They do exist in higher than API Level 10.