Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[iOS] Fix popup default color and dark mode #1041

Merged
merged 10 commits into from
Mar 13, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using static Android.App.ActionBar;
using AColorRes = Android.Resource.Color;
using AView = Android.Views.View;
using FormsPlatform = Xamarin.Forms.Platform.Android.Platform;
using GravityFlags = Android.Views.GravityFlags;
Expand Down Expand Up @@ -125,7 +126,7 @@ void SetEvents(in BasePopup basePopup)
basePopup.Dismissed += OnDismissed;
}

void SetColor(in BasePopup basePopup) => Window?.SetBackgroundDrawable(new ColorDrawable(basePopup.Color.ToAndroid()));
void SetColor(in BasePopup basePopup) => Window?.SetBackgroundDrawable(new ColorDrawable(basePopup.Color.ToAndroid(AColorRes.BackgroundLight, Context)));

void SetSize(in BasePopup basePopup)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public abstract class BasePopup : VisualElement
/// </summary>
protected BasePopup()
{
Color = Color.White;
geskill marked this conversation as resolved.
Show resolved Hide resolved
VerticalOptions = LayoutOptions.CenterAndExpand;
HorizontalOptions = LayoutOptions.CenterAndExpand;
IsLightDismissEnabled = true;
Expand Down