From 33dd68b7b11cdc9d519f7836ee1c30c6c4b6982c Mon Sep 17 00:00:00 2001 From: Pavel Yakovlev Date: Sat, 23 Feb 2019 12:30:47 +0300 Subject: [PATCH] [Android iOS Visual] fixes background in ActivityIndicator (#5283) * [Android, iOS Visual] fixes background in AcrivityIndicator * [Android] reduce nesting layouts * [Android] simplification * Some calculations for iOS * [Android] removed padding, added size limit [iOS] fixes stroke width * [iOS] default size as in Android * Use the Android ratio of 10 instead of the spec of 12 * [Android] fix API23 * [iOS] fix unexpected padding * [Android] fixes padding in API 23 -- IsRunning -- added gallery * [Android] fixes start with IsRunning = false * [Android] again fix isRunning * address comments --- .../ControlGalleryPages/VisualGallery.xaml | 17 ++-- Xamarin.Forms.Controls/CoreGallery.cs | 1 + .../MaterialActivityIndicatorGallery.cs | 92 ++++++++++++++++++++++ .../GalleryPages/MaterialProgressBarGallery.cs | 2 +- .../MaterialActivityIndicatorRenderer.cs | 44 ++++++++--- .../Material/MaterialActivityIndicatorRenderer.cs | 63 +++++++-------- .../Renderers/CircularProgress.cs | 91 +++++++++++++++++++++ .../MaterialActivityIndicatorBackground.xml | 11 +++ .../MaterialActivityIndicatorBackground.xml | 7 +- .../Xamarin.Forms.Platform.Android.csproj | 10 ++- 10 files changed, 284 insertions(+), 54 deletions(-) create mode 100644 Xamarin.Forms.Controls/GalleryPages/MaterialActivityIndicatorGallery.cs create mode 100644 Xamarin.Forms.Platform.Android/Renderers/CircularProgress.cs create mode 100644 Xamarin.Forms.Platform.Android/Resources/drawable-v24/MaterialActivityIndicatorBackground.xml diff --git a/Xamarin.Forms.Controls/ControlGalleryPages/VisualGallery.xaml b/Xamarin.Forms.Controls/ControlGalleryPages/VisualGallery.xaml index e644fc5..983d5d2 100644 --- a/Xamarin.Forms.Controls/ControlGalleryPages/VisualGallery.xaml +++ b/Xamarin.Forms.Controls/ControlGalleryPages/VisualGallery.xaml @@ -31,19 +31,24 @@ -