Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
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,7 @@ public abstract class BasePopup : VisualElement
/// </summary>
protected BasePopup()
{
Color = Color.White;
Color = Color.Default;
Copy link
Contributor Author

@geskill geskill Mar 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, all of that can be removed, because we have the bindable default values.

	Color = Color.Default;
	VerticalOptions = LayoutOptions.CenterAndExpand;
	HorizontalOptions = LayoutOptions.CenterAndExpand;

VerticalOptions = LayoutOptions.CenterAndExpand;
HorizontalOptions = LayoutOptions.CenterAndExpand;
IsLightDismissEnabled = true;
Expand Down