maui-linux/Xamarin.Forms.Platform.Android/Renderers/FormsImageView.cs

36 строки
595 B
C#

using System;
using Android.Content;
using Android.Runtime;
using Android.Widget;
namespace Xamarin.Forms.Platform.Android
{
internal class FormsImageView : ImageView
{
bool _skipInvalidate;
public FormsImageView(Context context) : base(context)
{
}
protected FormsImageView(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
{
}
public override void Invalidate()
{
if (_skipInvalidate)
{
_skipInvalidate = false;
return;
}
base.Invalidate();
}
public void SkipInvalidate()
{
_skipInvalidate = true;
}
}
}