Skip to content

Commit aeff2cf

Browse files
authored
Create a java layer for LayoutViewGroup (#31601)
1 parent e25d106 commit aeff2cf

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.microsoft.maui;
2+
3+
import android.content.Context;
4+
import android.graphics.Canvas;
5+
import android.graphics.Path;
6+
import android.util.AttributeSet;
7+
import android.view.ViewGroup;
8+
9+
public abstract class PlatformViewGroup extends ViewGroup {
10+
public PlatformViewGroup(Context context) {
11+
super(context);
12+
}
13+
14+
public PlatformViewGroup(Context context, AttributeSet attrs) {
15+
super(context, attrs);
16+
}
17+
18+
public PlatformViewGroup(Context context, AttributeSet attrs, int defStyle) {
19+
super(context, attrs, defStyle);
20+
}
21+
22+
public PlatformViewGroup(Context context, AttributeSet attrs, int defStyle, int defStyleRes) {
23+
super(context, attrs, defStyle, defStyleRes);
24+
}
25+
}

src/Core/src/Platform/Android/LayoutViewGroup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Microsoft.Maui.Platform
1313
{
14-
public class LayoutViewGroup : ViewGroup, ICrossPlatformLayoutBacking, IVisualTreeElementProvidable
14+
public class LayoutViewGroup : PlatformViewGroup, ICrossPlatformLayoutBacking, IVisualTreeElementProvidable
1515
{
1616
readonly ARect _clipRect = new();
1717
readonly Context _context;

src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ Microsoft.Maui.Handlers.OpenWindowRequest.Deconstruct(out Microsoft.Maui.IPersis
2323
Microsoft.Maui.Handlers.OpenWindowRequest.OpenWindowRequest(Microsoft.Maui.Handlers.OpenWindowRequest! original) -> void
2424
Microsoft.Maui.Hosting.MauiAppBuilder.Environment.get -> Microsoft.Maui.Hosting.MauiHostEnvironment!
2525
Microsoft.Maui.Hosting.MauiAppBuilder.Properties.get -> System.Collections.Generic.IDictionary<object!, object!>!
26+
Microsoft.Maui.PlatformViewGroup
27+
override Microsoft.Maui.PlatformViewGroup.JniPeerMembers.get -> Java.Interop.JniPeerMembers!
28+
override Microsoft.Maui.PlatformViewGroup.ThresholdClass.get -> nint
29+
override Microsoft.Maui.PlatformViewGroup.ThresholdType.get -> System.Type!
30+
Microsoft.Maui.PlatformViewGroup.PlatformViewGroup(nint javaReference, Android.Runtime.JniHandleOwnership transfer) -> void
31+
Microsoft.Maui.PlatformViewGroup.PlatformViewGroup(Android.Content.Context? context) -> void
32+
Microsoft.Maui.PlatformViewGroup.PlatformViewGroup(Android.Content.Context? context, Android.Util.IAttributeSet? attrs) -> void
33+
Microsoft.Maui.PlatformViewGroup.PlatformViewGroup(Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyle) -> void
34+
Microsoft.Maui.PlatformViewGroup.PlatformViewGroup(Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyle, int defStyleRes) -> void
2635
Microsoft.Maui.Hosting.MauiHostEnvironment
2736
Microsoft.Maui.Hosting.MauiHostEnvironment.ApplicationName.get -> string!
2837
Microsoft.Maui.Hosting.MauiHostEnvironment.ApplicationName.set -> void

src/Core/src/Transforms/Metadata.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<!-- Public types -->
99
<attr path="//class[@name='PlatformAppCompatTextView']" name="visibility">public</attr>
1010
<attr path="//class[@name='PlatformContentViewGroup']" name="visibility">public</attr>
11+
<attr path="//class[@name='PlatformViewGroup']" name="visibility">public</attr>
1112
<attr path="//class[@name='PlatformWrapperView']" name="visibility">public</attr>
1213
<attr path="//class[@name='MauiViewGroup']" name="visibility">public</attr>
1314
<attr path="//interface[@name='ImageLoaderCallback']" name="visibility">public</attr>

0 commit comments

Comments
 (0)