From 4860a6dc5f18b6b91b6ad2df17adba78fe63b789 Mon Sep 17 00:00:00 2001 From: Jonathan Pryor Date: Tue, 30 Jul 2013 17:38:47 -0400 Subject: [PATCH] Fix member compatibility in DrawerLayout, SlidingPaneLayout. Commit 91f7d829 is great from a usability perspective, as EventArgs subclasses would have usable members, e.g. SlideOffset instead of P0. Unfortunately, this also breaks compatibility. Commit 91f7d829 fixed many of the incompatibilities, but we've found others that need fixing. --- Compatibility-v13/bindings/Makefile | 2 + Compatibility-v4/bindings/Makefile | 2 + src/Android.Support.V4.Widget/DrawerLayout.cs | 40 +++++++++++++++++++ .../SlidingPaneLayout.cs | 32 +++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 src/Android.Support.V4.Widget/DrawerLayout.cs create mode 100644 src/Android.Support.V4.Widget/SlidingPaneLayout.cs diff --git a/Compatibility-v13/bindings/Makefile b/Compatibility-v13/bindings/Makefile index 02b6a27..b144d39 100644 --- a/Compatibility-v13/bindings/Makefile +++ b/Compatibility-v13/bindings/Makefile @@ -25,6 +25,8 @@ SOURCES = \ $(topdir)/src/Android.Support.V4.Content/CursorLoader.cs \ $(topdir)/src/Android.Support.V4.Content/Loader.cs \ $(topdir)/src/Android.Support.V4.View/ViewPager.cs \ + $(topdir)/src/Android.Support.V4.Widget/DrawerLayout.cs \ + $(topdir)/src/Android.Support.V4.Widget/SlidingPaneLayout.cs \ src/AssemblyInfo.cs $(ASSEMBLIES): $(platforms_dir)/android-%/Mono.Android.Support.v13.dll: $(JAR) EnumFields.xml EnumMethods.xml Metadata.xml $(SOURCES) $(MCW_GEN) diff --git a/Compatibility-v4/bindings/Makefile b/Compatibility-v4/bindings/Makefile index 622645d..887ade1 100644 --- a/Compatibility-v4/bindings/Makefile +++ b/Compatibility-v4/bindings/Makefile @@ -26,6 +26,8 @@ SOURCES = \ $(topdir)/src/Android.Support.V4.Content/CursorLoader.cs \ $(topdir)/src/Android.Support.V4.Content/Loader.cs \ $(topdir)/src/Android.Support.V4.View/ViewPager.cs \ + $(topdir)/src/Android.Support.V4.Widget/DrawerLayout.cs \ + $(topdir)/src/Android.Support.V4.Widget/SlidingPaneLayout.cs \ src/AssemblyInfo.cs $(ASSEMBLIES): $(platforms_dir)/android-%/Mono.Android.Support.v4.dll: $(JAR) EnumFields.xml EnumMethods.xml Metadata.xml $(SOURCES) $(MCW_GEN) diff --git a/src/Android.Support.V4.Widget/DrawerLayout.cs b/src/Android.Support.V4.Widget/DrawerLayout.cs new file mode 100644 index 0000000..3df938d --- /dev/null +++ b/src/Android.Support.V4.Widget/DrawerLayout.cs @@ -0,0 +1,40 @@ +using System; + +namespace Android.Support.V4.Widget { + + partial class DrawerLayout { + + partial class DrawerClosedEventArgs { + + public global::Android.Views.View P0 { + get {return DrawerView;} + } + } + + partial class DrawerOpenedEventArgs { + + public global::Android.Views.View P0 { + get {return DrawerView;} + } + } + + partial class DrawerSlideEventArgs { + + public global::Android.Views.View P0 { + get {return DrawerView;} + } + + public float P1 { + get {return slideOffset;} + } + } + + partial class DrawerStateChangedEventArgs { + + public int P0 { + get {return NewState;} + } + } + } +} + diff --git a/src/Android.Support.V4.Widget/SlidingPaneLayout.cs b/src/Android.Support.V4.Widget/SlidingPaneLayout.cs new file mode 100644 index 0000000..ed13ff9 --- /dev/null +++ b/src/Android.Support.V4.Widget/SlidingPaneLayout.cs @@ -0,0 +1,32 @@ +using System; + +namespace Android.Support.V4.Widget { + + partial class SlidingPaneLayout { + + partial class PanelClosedEventArgs { + + public global::Android.Views.View P0 { + get {return Panel;} + } + } + + partial class PanelOpenedEventArgs { + + public global::Android.Views.View P0 { + get {return Panel;} + } + } + + partial class PanelSlideEventArgs { + + public global::Android.Views.View P0 { + get {return Panel;} + } + + public float P1 { + get {return SlideOffset;} + } + } + } +}