From 27143a5a66ab5514b0c6bb3fb13e9097d7d5f718 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:49:04 +0000 Subject: [PATCH 1/4] Initial plan From 328b7aa646eb2707bd4afd352dba9765d7a95799 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:51:39 +0000 Subject: [PATCH 2/4] Fix Android PdfView default background to transparent Agent-Logs-Url: https://github.com/TheEightBot/MauiNativePdfView/sessions/79d2da60-a88c-42cf-bb98-58d306d9edd2 Co-authored-by: michaelstonis <120685+michaelstonis@users.noreply.github.com> --- .../Platforms/Android/PdfViewAndroid.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MauiNativePdfView/Platforms/Android/PdfViewAndroid.cs b/src/MauiNativePdfView/Platforms/Android/PdfViewAndroid.cs index 6531ba0..29a53d7 100644 --- a/src/MauiNativePdfView/Platforms/Android/PdfViewAndroid.cs +++ b/src/MauiNativePdfView/Platforms/Android/PdfViewAndroid.cs @@ -42,6 +42,7 @@ public class PdfViewAndroid : IPdfView, IDisposable public PdfViewAndroid(Context context) { _pdfView = new PDFView(context, null); + _pdfView.SetBackgroundColor(global::Android.Graphics.Color.Transparent); } /// @@ -226,15 +227,14 @@ public Color? BackgroundColor set { _backgroundColor = value; - if (value != null) - { - var androidColor = global::Android.Graphics.Color.Argb( + var androidColor = value != null + ? global::Android.Graphics.Color.Argb( (int)(value.Alpha * 255), (int)(value.Red * 255), (int)(value.Green * 255), - (int)(value.Blue * 255)); - _pdfView.SetBackgroundColor(androidColor); - } + (int)(value.Blue * 255)) + : global::Android.Graphics.Color.Transparent; + _pdfView.SetBackgroundColor(androidColor); } } From 7489ed39d645a58ec7a88f1d4b27330e57ce7913 Mon Sep 17 00:00:00 2001 From: Michael Stonis <120685+michaelstonis@users.noreply.github.com> Date: Wed, 17 Jun 2026 08:29:51 -0500 Subject: [PATCH 3/4] Fix non-compiling Color.Argb call in Android BackgroundColor setter The BackgroundColor setter's Color.Argb(...) call was missing its Blue argument and closing paren, leaving the ternary ':' where the 4th argument belongs. This caused CS1525/CS1026 and made the library unbuildable for net9.0-android. Complete the ARGB call and fix the indentation of the trailing SetBackgroundColor/Invalidate statements. No behavior change beyond making the project compile. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/MauiNativePdfView/Platforms/Android/PdfViewAndroid.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/MauiNativePdfView/Platforms/Android/PdfViewAndroid.cs b/src/MauiNativePdfView/Platforms/Android/PdfViewAndroid.cs index a3b7183..622e763 100644 --- a/src/MauiNativePdfView/Platforms/Android/PdfViewAndroid.cs +++ b/src/MauiNativePdfView/Platforms/Android/PdfViewAndroid.cs @@ -233,9 +233,10 @@ public Color? BackgroundColor (int)(value.Alpha * 255), (int)(value.Red * 255), (int)(value.Green * 255), + (int)(value.Blue * 255)) : global::Android.Graphics.Color.Transparent; - _pdfView.SetBackgroundColor(androidColor); - _pdfView.Invalidate(); + _pdfView.SetBackgroundColor(androidColor); + _pdfView.Invalidate(); } } From 5d067d47d495e903fa3cf87cbe5123a2ba9a2ed5 Mon Sep 17 00:00:00 2001 From: Michael Stonis <120685+michaelstonis@users.noreply.github.com> Date: Wed, 17 Jun 2026 09:18:28 -0500 Subject: [PATCH 4/4] Add Repro Lab sample page for layout/composition testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a dedicated, toggle-driven repro harness (LayoutReproPage) for validating layering issues such as GitHub issue #8 (content overlapping a PdfView hidden unless BackgroundColor is set; scroll-time flicker). Controls: - Layout: Overlay (header shares the PdfView cell — the #8 repro) vs Stacked (separate row — the control case). - Background: cycle (unset) -> Transparent -> White to demonstrate the default-transparent behavior added in 328b7aa. - Header ZIndex: toggle the commenter's flicker workaround. Wires both pages into a Shell flyout and makes Repro Lab the landing page. Co-Authored-By: Claude Opus 4.8 (1M context) --- samples/MauiPdfViewerSample/AppShell.xaml | 10 +- .../MauiPdfViewerSample/LayoutReproPage.xaml | 107 +++++++++++++ .../LayoutReproPage.xaml.cs | 144 ++++++++++++++++++ 3 files changed, 260 insertions(+), 1 deletion(-) create mode 100644 samples/MauiPdfViewerSample/LayoutReproPage.xaml create mode 100644 samples/MauiPdfViewerSample/LayoutReproPage.xaml.cs diff --git a/samples/MauiPdfViewerSample/AppShell.xaml b/samples/MauiPdfViewerSample/AppShell.xaml index f029871..d88b7c9 100644 --- a/samples/MauiPdfViewerSample/AppShell.xaml +++ b/samples/MauiPdfViewerSample/AppShell.xaml @@ -4,9 +4,17 @@ xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:MauiPdfViewerSample" + FlyoutBehavior="Flyout" Title="MauiPdfViewerSample"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + +