summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/VisualElementTracker.cs
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2017-02-06 15:18:16 +0100
committerStephane Delcroix <stephane@delcroix.org>2017-02-06 15:18:16 +0100
commitfaa6eae8e72d810c8d16dd92e02b305dbf35548c (patch)
tree78a91ae8be6dd37b03c2f345b54c07472d7f58b9 /Xamarin.Forms.Platform.Android/VisualElementTracker.cs
parentfc7d556848e731902d096953c9b4fb28a2466e6b (diff)
downloadxamarin-forms-faa6eae8e72d810c8d16dd92e02b305dbf35548c.tar.gz
xamarin-forms-faa6eae8e72d810c8d16dd92e02b305dbf35548c.tar.bz2
xamarin-forms-faa6eae8e72d810c8d16dd92e02b305dbf35548c.zip
Revert "[*] ScaleX and ScaleY"
This reverts commit fc7d556848e731902d096953c9b4fb28a2466e6b.
Diffstat (limited to 'Xamarin.Forms.Platform.Android/VisualElementTracker.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/VisualElementTracker.cs25
1 files changed, 8 insertions, 17 deletions
diff --git a/Xamarin.Forms.Platform.Android/VisualElementTracker.cs b/Xamarin.Forms.Platform.Android/VisualElementTracker.cs
index b2e9fe47..7ade4596 100644
--- a/Xamarin.Forms.Platform.Android/VisualElementTracker.cs
+++ b/Xamarin.Forms.Platform.Android/VisualElementTracker.cs
@@ -120,7 +120,7 @@ namespace Xamarin.Forms.Platform.Android
if (e.PropertyName == VisualElement.XProperty.PropertyName || e.PropertyName == VisualElement.YProperty.PropertyName || e.PropertyName == VisualElement.WidthProperty.PropertyName ||
e.PropertyName == VisualElement.HeightProperty.PropertyName)
_layoutNeeded = true;
- else if (e.PropertyName == VisualElement.AnchorXProperty.PropertyName || e.PropertyName == VisualElement.AnchorYProperty.PropertyName || e.PropertyName == VisualElement.ScaleProperty.PropertyName || e.PropertyName == VisualElement.ScaleXProperty.PropertyName || e.PropertyName == VisualElement.ScaleYProperty.PropertyName ||
+ else if (e.PropertyName == VisualElement.AnchorXProperty.PropertyName || e.PropertyName == VisualElement.AnchorYProperty.PropertyName || e.PropertyName == VisualElement.ScaleProperty.PropertyName ||
e.PropertyName == VisualElement.RotationProperty.PropertyName || e.PropertyName == VisualElement.RotationXProperty.PropertyName || e.PropertyName == VisualElement.RotationYProperty.PropertyName ||
e.PropertyName == VisualElement.IsVisibleProperty.PropertyName || e.PropertyName == VisualElement.OpacityProperty.PropertyName ||
e.PropertyName == VisualElement.TranslationXProperty.PropertyName || e.PropertyName == VisualElement.TranslationYProperty.PropertyName)
@@ -138,7 +138,7 @@ namespace Xamarin.Forms.Platform.Android
UpdateAnchorX();
else if (e.PropertyName == VisualElement.AnchorYProperty.PropertyName)
UpdateAnchorY();
- else if (e.PropertyName == VisualElement.ScaleProperty.PropertyName || e.PropertyName == VisualElement.ScaleXProperty.PropertyName || e.PropertyName == VisualElement.ScaleYProperty.PropertyName)
+ else if (e.PropertyName == VisualElement.ScaleProperty.PropertyName)
UpdateScale();
else if (e.PropertyName == VisualElement.RotationProperty.PropertyName)
UpdateRotation();
@@ -230,7 +230,7 @@ namespace Xamarin.Forms.Platform.Android
UpdateRotationX();
if (oldElement.RotationY != newElement.RotationY)
UpdateRotationY();
- if (oldElement.Scale != newElement.Scale || oldElement.ScaleX != newElement.ScaleY || oldElement.ScaleY != newElement.ScaleY)
+ if (oldElement.Scale != newElement.Scale)
UpdateScale();
// ReSharper restore CompareOfFloatsByEqualityOperator
@@ -299,18 +299,9 @@ namespace Xamarin.Forms.Platform.Android
if (aview is FormsViewGroup)
{
var formsViewGroup = (FormsViewGroup)aview;
- formsViewGroup.SendBatchUpdate((float)(view.AnchorX * _context.ToPixels(view.Width)),
- (float)(view.AnchorY * _context.ToPixels(view.Height)),
- (int)(view.IsVisible ? ViewStates.Visible : ViewStates.Invisible),
- view.IsEnabled,
- (float)view.Opacity,
- (float)view.Rotation,
- (float)view.RotationX,
- (float)view.RotationY,
- (float)view.ScaleX,
- (float)view.ScaleY,
- _context.ToPixels(view.TranslationX),
- _context.ToPixels(view.TranslationY));
+ formsViewGroup.SendBatchUpdate((float)(view.AnchorX * _context.ToPixels(view.Width)), (float)(view.AnchorY * _context.ToPixels(view.Height)),
+ (int)(view.IsVisible ? ViewStates.Visible : ViewStates.Invisible), view.IsEnabled, (float)view.Opacity, (float)view.Rotation, (float)view.RotationX, (float)view.RotationY, (float)view.Scale,
+ _context.ToPixels(view.TranslationX), _context.ToPixels(view.TranslationY));
}
else
{
@@ -374,8 +365,8 @@ namespace Xamarin.Forms.Platform.Android
VisualElement view = _renderer.Element;
AView aview = _renderer.ViewGroup;
- aview.ScaleX = (float)view.Scale * (float)view.ScaleX;
- aview.ScaleY = (float)view.Scale * (float)view.ScaleY;
+ aview.ScaleX = (float)view.Scale;
+ aview.ScaleY = (float)view.Scale;
}
void UpdateTranslationX()