44 lines
1021 B
C#
44 lines
1021 B
C#
using Android.Content;
|
|
using Gallery.Droid.Renderers;
|
|
using Gallery.UI;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Platform.Android;
|
|
|
|
[assembly: ExportRenderer(typeof(AdaptedPage), typeof(AdaptedPageRenderer))]
|
|
namespace Gallery.Droid.Renderers
|
|
{
|
|
public class AdaptedPageRenderer : PageRenderer
|
|
{
|
|
public AdaptedPageRenderer(Context context) : base(context)
|
|
{
|
|
}
|
|
|
|
protected override void OnAttachedToWindow()
|
|
{
|
|
base.OnAttachedToWindow();
|
|
|
|
if (Element is AdaptedPage page)
|
|
{
|
|
page.OnLoad();
|
|
}
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
if (Element is AdaptedPage page)
|
|
{
|
|
page.OnUnload();
|
|
}
|
|
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
//protected override void OnDetachedFromWindow()
|
|
//{
|
|
// App.DebugPrint("detached from window");
|
|
|
|
// base.OnDetachedFromWindow();
|
|
//}
|
|
}
|
|
}
|