summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Renderers/FormsImageView.cs
blob: ae32e16c5b19e9cca56a9ef0c80db645495d9f98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
		}
	}
}