diff --git a/AndroidBindableLibraries/Balloon/Additions/AboutAdditions.txt b/AndroidBindableLibraries/Balloon/Additions/AboutAdditions.txt new file mode 100644 index 00000000..2775bd36 --- /dev/null +++ b/AndroidBindableLibraries/Balloon/Additions/AboutAdditions.txt @@ -0,0 +1,48 @@ +Additions allow you to add arbitrary C# to the generated classes +before they are compiled. This can be helpful for providing convenience +methods or adding pure C# classes. + +== Adding Methods to Generated Classes == + +Let's say the library being bound has a Rectangle class with a constructor +that takes an x and y position, and a width and length size. It will look like +this: + +public partial class Rectangle +{ + public Rectangle (int x, int y, int width, int height) + { + // JNI bindings + } +} + +Imagine we want to add a constructor to this class that takes a Point and +Size structure instead of 4 ints. We can add a new file called Rectangle.cs +with a partial class containing our new method: + +public partial class Rectangle +{ + public Rectangle (Point location, Size size) : + this (location.X, location.Y, size.Width, size.Height) + { + } +} + +At compile time, the additions class will be added to the generated class +and the final assembly will a Rectangle class with both constructors. + + +== Adding C# Classes == + +Another thing that can be done is adding fully C# managed classes to the +generated library. In the above example, let's assume that there isn't a +Point class available in Java or our library. The one we create doesn't need +to interact with Java, so we'll create it like a normal class in C#. + +By adding a Point.cs file with this class, it will end up in the binding library: + +public class Point +{ + public int X { get; set; } + public int Y { get; set; } +} \ No newline at end of file diff --git a/AndroidBindableLibraries/Balloon/Balloon.csproj b/AndroidBindableLibraries/Balloon/Balloon.csproj new file mode 100644 index 00000000..b7a9814d --- /dev/null +++ b/AndroidBindableLibraries/Balloon/Balloon.csproj @@ -0,0 +1,45 @@ + + + 23 + VladislavAntonyuk.$(AssemblyName) + 1.6.4 + ReadMe.md + ..\..\LocalPackages\ + + + + + + + + + + + 8.4.0 + + + 2.7.0.2 + + + 1.7.1.2 + + + 1.9.23.1 + + + 1.6.1.8 + + + 1.13.1 + + + 1.7.0 + + + + + True + \ + + + \ No newline at end of file diff --git a/AndroidBindableLibraries/Balloon/BalloonLayoutBodyBinding.cs b/AndroidBindableLibraries/Balloon/BalloonLayoutBodyBinding.cs new file mode 100644 index 00000000..a65c5001 --- /dev/null +++ b/AndroidBindableLibraries/Balloon/BalloonLayoutBodyBinding.cs @@ -0,0 +1,24 @@ +namespace Com.Skydoves.Balloon.Databinding; + +using Android.Runtime; + +public sealed partial class BalloonLayoutBodyBinding : global::Java.Lang.Object, global::AndroidX.ViewBinding.IViewBinding +{ + public unsafe global::Android.Views.View Root + { + // Metadata.xml XPath method reference: path="/api/package[@name='com.skydoves.balloon.databinding']/class[@name='BalloonLayoutOverlayBinding']/method[@name='getRoot' and count(parameter)=0]" + [Register("getRoot", "()Lcom/skydoves/balloon/overlay/BalloonAnchorOverlayView;", "")] + get + { + const string __id = "getRoot.()Lcom/skydoves/balloon/overlay/BalloonAnchorOverlayView;"; + try + { + var __rm = _members.InstanceMethods.InvokeAbstractObjectMethod(__id, this, null); + return global::Java.Lang.Object.GetObject(__rm.Handle, JniHandleOwnership.TransferLocalRef)!; + } + finally + { + } + } + } +} \ No newline at end of file diff --git a/AndroidBindableLibraries/Balloon/BalloonLayoutOverlayBinding.cs b/AndroidBindableLibraries/Balloon/BalloonLayoutOverlayBinding.cs new file mode 100644 index 00000000..2f87bf62 --- /dev/null +++ b/AndroidBindableLibraries/Balloon/BalloonLayoutOverlayBinding.cs @@ -0,0 +1,24 @@ +namespace Com.Skydoves.Balloon.Databinding; + +using Android.Runtime; + +public sealed partial class BalloonLayoutOverlayBinding : global::Java.Lang.Object, global::AndroidX.ViewBinding.IViewBinding +{ + public unsafe global::Android.Views.View Root + { + // Metadata.xml XPath method reference: path="/api/package[@name='com.skydoves.balloon.databinding']/class[@name='BalloonLayoutOverlayBinding']/method[@name='getRoot' and count(parameter)=0]" + [Register("getRoot", "()Lcom/skydoves/balloon/overlay/BalloonAnchorOverlayView;", "")] + get + { + const string __id = "getRoot.()Lcom/skydoves/balloon/overlay/BalloonAnchorOverlayView;"; + try + { + var __rm = _members.InstanceMethods.InvokeAbstractObjectMethod(__id, this, null); + return global::Java.Lang.Object.GetObject(__rm.Handle, JniHandleOwnership.TransferLocalRef)!; + } + finally + { + } + } + } +} \ No newline at end of file diff --git a/AndroidBindableLibraries/Balloon/ReadMe.md b/AndroidBindableLibraries/Balloon/ReadMe.md new file mode 100644 index 00000000..e8ba739f --- /dev/null +++ b/AndroidBindableLibraries/Balloon/ReadMe.md @@ -0,0 +1,3 @@ +# Android Balloon + +Android Java Library Binding for [Balloon](https://github.com/skydoves/Balloon) \ No newline at end of file diff --git a/AndroidBindableLibraries/Balloon/Transforms/EnumFields.xml b/AndroidBindableLibraries/Balloon/Transforms/EnumFields.xml new file mode 100644 index 00000000..22959957 --- /dev/null +++ b/AndroidBindableLibraries/Balloon/Transforms/EnumFields.xml @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/AndroidBindableLibraries/Balloon/Transforms/EnumMethods.xml b/AndroidBindableLibraries/Balloon/Transforms/EnumMethods.xml new file mode 100644 index 00000000..49216c61 --- /dev/null +++ b/AndroidBindableLibraries/Balloon/Transforms/EnumMethods.xml @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/AndroidBindableLibraries/Balloon/Transforms/Metadata.xml b/AndroidBindableLibraries/Balloon/Transforms/Metadata.xml new file mode 100644 index 00000000..e23cf28f --- /dev/null +++ b/AndroidBindableLibraries/Balloon/Transforms/Metadata.xml @@ -0,0 +1,17 @@ + + + + + + diff --git a/AndroidBindableLibraries/Sample/App.xaml b/AndroidBindableLibraries/Sample/App.xaml new file mode 100644 index 00000000..44de3734 --- /dev/null +++ b/AndroidBindableLibraries/Sample/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/AndroidBindableLibraries/Sample/App.xaml.cs b/AndroidBindableLibraries/Sample/App.xaml.cs new file mode 100644 index 00000000..0d0f7b65 --- /dev/null +++ b/AndroidBindableLibraries/Sample/App.xaml.cs @@ -0,0 +1,12 @@ +namespace Sample +{ + public partial class App : Application + { + public App() + { + InitializeComponent(); + + MainPage = new AppShell(); + } + } +} diff --git a/AndroidBindableLibraries/Sample/AppShell.xaml b/AndroidBindableLibraries/Sample/AppShell.xaml new file mode 100644 index 00000000..a2993df7 --- /dev/null +++ b/AndroidBindableLibraries/Sample/AppShell.xaml @@ -0,0 +1,15 @@ + + + + + + diff --git a/AndroidBindableLibraries/Sample/AppShell.xaml.cs b/AndroidBindableLibraries/Sample/AppShell.xaml.cs new file mode 100644 index 00000000..a3797080 --- /dev/null +++ b/AndroidBindableLibraries/Sample/AppShell.xaml.cs @@ -0,0 +1,10 @@ +namespace Sample +{ + public partial class AppShell : Shell + { + public AppShell() + { + InitializeComponent(); + } + } +} diff --git a/AndroidBindableLibraries/Sample/BallonContent.xaml b/AndroidBindableLibraries/Sample/BallonContent.xaml new file mode 100644 index 00000000..c60ac9e4 --- /dev/null +++ b/AndroidBindableLibraries/Sample/BallonContent.xaml @@ -0,0 +1,23 @@ + + + + + + + + +