Skip to content

Commit c022751

Browse files
Merge branch 'syncfusion:main' into TextInputLayout-Entry-Accessibility-Issue
2 parents feaa4fc + 11b87c9 commit c022751

File tree

11 files changed

+1242
-976
lines changed

11 files changed

+1242
-976
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.idea
22
bin
33
obj
4+
.vs/
5+
.vshistory/

maui/src/Carousel/Platform/Android/PlatformCarousel.Android.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,7 +3126,6 @@ void PopulateTempList()
31263126
_tempList?.Add(carouselItem);
31273127
}
31283128
}
3129-
ArrangeItemsBasedOnVirtualization();
31303129
}
31313130
}
31323131

@@ -3655,4 +3654,4 @@ public override void GetItemOffsets(Rect outRect, View view, RecyclerView parent
36553654

36563655
}
36573656
#endregion
3658-
}
3657+
}

maui/src/Charts/Utils/DoubleRange.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ namespace Syncfusion.Maui.Toolkit.Charts
88
public struct DoubleRange
99
{
1010
#region Members
11-
/// <summary>
12-
/// Initializes _empty
13-
/// </summary>
14-
static readonly DoubleRange _empty = new(double.NaN, double.NaN);
11+
1512
readonly bool _isEmpty;
1613

1714
/// <summary>
@@ -36,7 +33,7 @@ public static DoubleRange Empty
3633
{
3734
get
3835
{
39-
return _empty;
36+
return new DoubleRange(double.NaN, double.NaN);
4037
}
4138
}
4239

maui/src/Core/Extensions/CanvasExtensions.Android.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Android.Graphics;
33
using Android.Text;
44
using Microsoft.Maui.Graphics.Platform;
5+
using System;
56
using Font = Microsoft.Maui.Font;
67
using Paint = Android.Graphics.Paint;
78
using Rect = Microsoft.Maui.Graphics.Rect;
@@ -106,7 +107,9 @@ public static void DrawText(this ICanvas canvas, string value, Rect rect, Horizo
106107
alignment = Android.Text.Layout.Alignment.AlignOpposite;
107108
}
108109

109-
StaticTextLayout layout = new StaticTextLayout(value, paint, (int)(rect.Width * nativeCanvas.DisplayScale), alignment, 1.0f, 0.0f, false);
110+
// Ensure width is positive to prevent Android StaticLayout crashes
111+
int layoutWidth = Math.Max(1, (int)(rect.Width * nativeCanvas.DisplayScale));
112+
StaticTextLayout layout = new StaticTextLayout(value, paint, layoutWidth, alignment, 1.0f, 0.0f, false);
110113
double rectDensityHeight = rect.Height * nativeCanvas.DisplayScale;
111114
//// Check the layout does not accommodate the text inside the specified rect then
112115
//// restrict the text rendering with line count.

0 commit comments

Comments
 (0)