summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/CellAdapter.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs10
-rw-r--r--Xamarin.Forms.Platform.Android/Cells/EntryCellView.cs4
-rw-r--r--Xamarin.Forms.Platform.Android/ColorExtensions.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/ContextExtensions.cs4
-rw-r--r--Xamarin.Forms.Platform.Android/Deserializer.cs14
-rw-r--r--Xamarin.Forms.Platform.Android/Forms.cs14
-rw-r--r--Xamarin.Forms.Platform.Android/KeyboardManager.cs4
-rw-r--r--Xamarin.Forms.Platform.Android/Platform.cs4
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/ActionSheetRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/ButtonDrawable.cs6
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs28
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/ImageLoaderSourceHandler.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/StreamImagesourceHandler.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/TableViewModelRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/ToolbarRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/ResourcesProvider.cs4
-rw-r--r--Xamarin.Forms.Platform.Android/ViewExtensions.cs4
23 files changed, 60 insertions, 60 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
index c6e31e18..c7df08e2 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/ButtonRenderer.cs
@@ -121,7 +121,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
int id = GlobalResource.Attribute.ButtonTint;
unchecked
{
- using(var value = new TypedValue())
+ using (var value = new TypedValue())
{
try
{
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs b/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs
index 916f1859..b7c02205 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/FormsAppCompatActivity.cs
@@ -293,7 +293,7 @@ namespace Xamarin.Forms.Platform.Android
{
FormsAppCompatActivity context = this;
int id = global::Android.Resource.Attribute.ColorPrimaryDark;
- using(var value = new TypedValue())
+ using (var value = new TypedValue())
{
try
{
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs
index fd4cb72b..7edbffb2 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/NavigationPageRenderer.cs
@@ -320,7 +320,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
int attr = Resource.Attribute.actionBarSize;
int actionBarHeight;
- using(var tv = new TypedValue())
+ using (var tv = new TypedValue())
{
actionBarHeight = 0;
if (Context.Theme.ResolveAttribute(attr, tv, true))
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs
index d59d9f6e..dd7fb85c 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/PickerRenderer.cs
@@ -87,7 +87,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
void OnClick()
{
Picker model = Element;
- using(var builder = new AlertDialog.Builder(Context))
+ using (var builder = new AlertDialog.Builder(Context))
{
builder.SetTitle(model.Title ?? "");
string[] items = model.Items.ToArray();
diff --git a/Xamarin.Forms.Platform.Android/CellAdapter.cs b/Xamarin.Forms.Platform.Android/CellAdapter.cs
index 9f439157..58c35a89 100644
--- a/Xamarin.Forms.Platform.Android/CellAdapter.cs
+++ b/Xamarin.Forms.Platform.Android/CellAdapter.cs
@@ -159,7 +159,7 @@ namespace Xamarin.Forms.Platform.Android
protected void SetSelectedBackground(AView view, bool isContextTarget = false)
{
int attribute = isContextTarget ? global::Android.Resource.Attribute.ColorLongPressedHighlight : global::Android.Resource.Attribute.ColorActivatedHighlight;
- using(var value = new TypedValue())
+ using (var value = new TypedValue())
{
if (_context.Theme.ResolveAttribute(attribute, value, true))
view.SetBackgroundResource(value.ResourceId);
diff --git a/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs b/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs
index 7855b01e..46959c08 100644
--- a/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs
+++ b/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs
@@ -46,7 +46,7 @@ namespace Xamarin.Forms.Platform.Android
RightMargin = 0,
Gravity = GravityFlags.Center
};
- using(imageParams)
+ using (imageParams)
AddView(_imageView, imageParams);
var textLayout = new LinearLayout(context) { Orientation = Orientation.Vertical };
@@ -56,7 +56,7 @@ namespace Xamarin.Forms.Platform.Android
_mainText.Ellipsize = TextUtils.TruncateAt.End;
_mainText.SetPadding((int)context.ToPixels(15), padding, padding, padding);
_mainText.SetTextAppearance(context, global::Android.Resource.Attribute.TextAppearanceListItem);
- using(var lp = new LayoutParams(ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.WrapContent))
+ using (var lp = new LayoutParams(ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.WrapContent))
textLayout.AddView(_mainText, lp);
_detailText = new TextView(context);
@@ -65,12 +65,12 @@ namespace Xamarin.Forms.Platform.Android
_detailText.SetPadding((int)context.ToPixels(15), padding, padding, padding);
_detailText.Visibility = ViewStates.Gone;
_detailText.SetTextAppearance(context, global::Android.Resource.Attribute.TextAppearanceListItemSmall);
- using(var lp = new LayoutParams(ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.WrapContent))
+ using (var lp = new LayoutParams(ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.WrapContent))
textLayout.AddView(_detailText, lp);
var layoutParams = new LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent) { Width = 0, Weight = 1, Gravity = GravityFlags.Center };
- using(layoutParams)
+ using (layoutParams)
AddView(textLayout, layoutParams);
SetMinimumHeight((int)context.ToPixels(DefaultMinHeight));
@@ -118,7 +118,7 @@ namespace Xamarin.Forms.Platform.Android
if (view != null)
{
- using(var layout = new LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.FillParent))
+ using (var layout = new LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.FillParent))
AddView(view, layout);
AccessoryView = view;
diff --git a/Xamarin.Forms.Platform.Android/Cells/EntryCellView.cs b/Xamarin.Forms.Platform.Android/Cells/EntryCellView.cs
index c0206f1e..f94709d0 100644
--- a/Xamarin.Forms.Platform.Android/Cells/EntryCellView.cs
+++ b/Xamarin.Forms.Platform.Android/Cells/EntryCellView.cs
@@ -32,7 +32,7 @@ namespace Xamarin.Forms.Platform.Android
_label.SetTextAppearance(context, global::Android.Resource.Attribute.TextAppearanceListItem);
var layoutParams = new LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent) { Gravity = GravityFlags.CenterVertical };
- using(layoutParams)
+ using (layoutParams)
AddView(_label, layoutParams);
EditText = new EntryCellEditText(context);
@@ -43,7 +43,7 @@ namespace Xamarin.Forms.Platform.Android
EditText.BackButtonPressed += OnBackButtonPressed;
//editText.SetBackgroundDrawable (null);
layoutParams = new LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent) { Width = 0, Weight = 1, Gravity = GravityFlags.FillHorizontal | GravityFlags.Center };
- using(layoutParams)
+ using (layoutParams)
AddView(EditText, layoutParams);
}
diff --git a/Xamarin.Forms.Platform.Android/ColorExtensions.cs b/Xamarin.Forms.Platform.Android/ColorExtensions.cs
index afe7286d..707363ed 100644
--- a/Xamarin.Forms.Platform.Android/ColorExtensions.cs
+++ b/Xamarin.Forms.Platform.Android/ColorExtensions.cs
@@ -16,7 +16,7 @@ namespace Xamarin.Forms.Platform.Android
{
if (self == Color.Default)
{
- using(Resources resources = Resources.System)
+ using (Resources resources = Resources.System)
return resources.GetColor(defaultColorResourceId);
}
diff --git a/Xamarin.Forms.Platform.Android/ContextExtensions.cs b/Xamarin.Forms.Platform.Android/ContextExtensions.cs
index 9a22c570..b3a219fd 100644
--- a/Xamarin.Forms.Platform.Android/ContextExtensions.cs
+++ b/Xamarin.Forms.Platform.Android/ContextExtensions.cs
@@ -34,7 +34,7 @@ namespace Xamarin.Forms.Platform.Android
internal static double GetThemeAttributeDp(this Context self, int resource)
{
- using(var value = new TypedValue())
+ using (var value = new TypedValue())
{
if (!self.Theme.ResolveAttribute(resource, value, true))
return -1;
@@ -51,7 +51,7 @@ namespace Xamarin.Forms.Platform.Android
if (s_displayDensity != float.MinValue)
return;
- using(DisplayMetrics metrics = context.Resources.DisplayMetrics)
+ using (DisplayMetrics metrics = context.Resources.DisplayMetrics)
s_displayDensity = metrics.Density;
}
}
diff --git a/Xamarin.Forms.Platform.Android/Deserializer.cs b/Xamarin.Forms.Platform.Android/Deserializer.cs
index 4c62ad1a..b1eafa88 100644
--- a/Xamarin.Forms.Platform.Android/Deserializer.cs
+++ b/Xamarin.Forms.Platform.Android/Deserializer.cs
@@ -18,9 +18,9 @@ namespace Xamarin.Forms.Platform.Android
// Make sure to use Internal
return Task.Run(() =>
{
- using(IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
- using(IsolatedStorageFileStream stream = store.OpenFile(PropertyStoreFile, System.IO.FileMode.OpenOrCreate))
- using(XmlDictionaryReader reader = XmlDictionaryReader.CreateBinaryReader(stream, XmlDictionaryReaderQuotas.Max))
+ using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
+ using (IsolatedStorageFileStream stream = store.OpenFile(PropertyStoreFile, System.IO.FileMode.OpenOrCreate))
+ using (XmlDictionaryReader reader = XmlDictionaryReader.CreateBinaryReader(stream, XmlDictionaryReaderQuotas.Max))
{
if (stream.Length == 0)
return null;
@@ -49,9 +49,9 @@ namespace Xamarin.Forms.Platform.Android
return Task.Run(() =>
{
var success = false;
- using(IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
- using(IsolatedStorageFileStream stream = store.OpenFile(PropertyStoreFile + ".tmp", System.IO.FileMode.OpenOrCreate))
- using(XmlDictionaryWriter writer = XmlDictionaryWriter.CreateBinaryWriter(stream))
+ using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
+ using (IsolatedStorageFileStream stream = store.OpenFile(PropertyStoreFile + ".tmp", System.IO.FileMode.OpenOrCreate))
+ using (XmlDictionaryWriter writer = XmlDictionaryWriter.CreateBinaryWriter(stream))
{
try
{
@@ -69,7 +69,7 @@ namespace Xamarin.Forms.Platform.Android
if (!success)
return;
- using(IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
+ using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
{
try
{
diff --git a/Xamarin.Forms.Platform.Android/Forms.cs b/Xamarin.Forms.Platform.Android/Forms.cs
index 8eb50380..b2ded248 100644
--- a/Xamarin.Forms.Platform.Android/Forms.cs
+++ b/Xamarin.Forms.Platform.Android/Forms.cs
@@ -161,7 +161,7 @@ namespace Xamarin.Forms
CheckOrientationChanged(_formsActivity.Resources.Configuration.Orientation);
formsActivity.ConfigurationChanged += ConfigurationChanged;
- using(DisplayMetrics display = formsActivity.Resources.DisplayMetrics)
+ using (DisplayMetrics display = formsActivity.Resources.DisplayMetrics)
{
_scalingFactor = display.Density;
_pixelScreenSize = new Size(display.WidthPixels, display.HeightPixels);
@@ -352,8 +352,8 @@ namespace Xamarin.Forms
public async Task<Stream> GetStreamAsync(Uri uri, CancellationToken cancellationToken)
{
- using(var client = new HttpClient())
- using(HttpResponseMessage response = await client.GetAsync(uri, cancellationToken))
+ using (var client = new HttpClient())
+ using (HttpResponseMessage response = await client.GetAsync(uri, cancellationToken))
return await response.Content.ReadAsStreamAsync();
}
@@ -366,8 +366,8 @@ namespace Xamarin.Forms
{
get
{
- using(Looper my = Looper.MyLooper())
- using(Looper main = Looper.MainLooper)
+ using (Looper my = Looper.MyLooper())
+ using (Looper main = Looper.MainLooper)
return my != main;
}
}
@@ -415,13 +415,13 @@ namespace Xamarin.Forms
val = 0;
try
{
- using(var value = new TypedValue())
+ using (var value = new TypedValue())
{
if (Context.Theme.ResolveAttribute(appearance, value, true))
{
var textSizeAttr = new[] { Resource.Attribute.TextSize };
const int indexOfAttrTextSize = 0;
- using(TypedArray array = Context.ObtainStyledAttributes(value.Data, textSizeAttr))
+ using (TypedArray array = Context.ObtainStyledAttributes(value.Data, textSizeAttr))
{
val = Context.FromPixels(array.GetDimensionPixelSize(indexOfAttrTextSize, -1));
return true;
diff --git a/Xamarin.Forms.Platform.Android/KeyboardManager.cs b/Xamarin.Forms.Platform.Android/KeyboardManager.cs
index 649c99bd..db478578 100644
--- a/Xamarin.Forms.Platform.Android/KeyboardManager.cs
+++ b/Xamarin.Forms.Platform.Android/KeyboardManager.cs
@@ -11,7 +11,7 @@ namespace Xamarin.Forms.Platform.Android
{
internal static void HideKeyboard(this AView inputView, bool overrideValidation = false)
{
- using(var inputMethodManager = (InputMethodManager)Forms.Context.GetSystemService(Context.InputMethodService))
+ using (var inputMethodManager = (InputMethodManager)Forms.Context.GetSystemService(Context.InputMethodService))
{
IBinder windowToken = null;
@@ -26,7 +26,7 @@ namespace Xamarin.Forms.Platform.Android
internal static void ShowKeyboard(this AView inputView)
{
- using(var inputMethodManager = (InputMethodManager)Forms.Context.GetSystemService(Context.InputMethodService))
+ using (var inputMethodManager = (InputMethodManager)Forms.Context.GetSystemService(Context.InputMethodService))
{
if (inputView is EditText || inputView is TextView || inputView is SearchView)
{
diff --git a/Xamarin.Forms.Platform.Android/Platform.cs b/Xamarin.Forms.Platform.Android/Platform.cs
index 1de13b41..baf7fa44 100644
--- a/Xamarin.Forms.Platform.Android/Platform.cs
+++ b/Xamarin.Forms.Platform.Android/Platform.cs
@@ -463,7 +463,7 @@ namespace Xamarin.Forms.Platform.Android
else if (CurrentNavigationPage.BarBackgroundColor != Color.Default)
colorToUse = CurrentNavigationPage.BarBackgroundColor;
}
- using(Drawable drawable = colorToUse == Color.Default ? GetActionBarBackgroundDrawable() : new ColorDrawable(colorToUse.ToAndroid()))
+ using (Drawable drawable = colorToUse == Color.Default ? GetActionBarBackgroundDrawable() : new ColorDrawable(colorToUse.ToAndroid()))
((Activity)_context).ActionBar.SetBackgroundDrawable(drawable);
}
@@ -663,7 +663,7 @@ namespace Xamarin.Forms.Platform.Android
{
int[] backgroundDataArray = { global::Android.Resource.Attribute.Background };
- using(var outVal = new TypedValue())
+ using (var outVal = new TypedValue())
{
_context.Theme.ResolveAttribute(global::Android.Resource.Attribute.ActionBarStyle, outVal, true);
TypedArray actionBarStyle = _context.Theme.ObtainStyledAttributes(outVal.ResourceId, backgroundDataArray);
diff --git a/Xamarin.Forms.Platform.Android/Renderers/ActionSheetRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/ActionSheetRenderer.cs
index ca51a709..8495d807 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/ActionSheetRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/ActionSheetRenderer.cs
@@ -49,7 +49,7 @@ namespace Xamarin.Forms.Platform.Android
_layout.Orientation = Orientation.Vertical;
- using(var layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent))
+ using (var layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FillParent, ViewGroup.LayoutParams.FillParent))
SetContentView(_layout, layoutParams);
if (_arguments.Destruction != null)
diff --git a/Xamarin.Forms.Platform.Android/Renderers/ButtonDrawable.cs b/Xamarin.Forms.Platform.Android/Renderers/ButtonDrawable.cs
index f25f9301..62eaecbf 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/ButtonDrawable.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/ButtonDrawable.cs
@@ -101,7 +101,7 @@ namespace Xamarin.Forms.Platform.Android
Bitmap CreateBitmap(bool pressed, int width, int height)
{
Bitmap bitmap = Bitmap.CreateBitmap(width, height, Bitmap.Config.Argb8888);
- using(var canvas = new Canvas(bitmap))
+ using (var canvas = new Canvas(bitmap))
{
DrawBackground(canvas, width, height, pressed);
DrawOutline(canvas, width, height);
@@ -129,8 +129,8 @@ namespace Xamarin.Forms.Platform.Android
if (Button.BorderWidth <= 0)
return;
- using(var paint = new Paint { AntiAlias = true })
- using(var path = new Path())
+ using (var paint = new Paint { AntiAlias = true })
+ using (var path = new Path())
{
float borderWidth = Forms.Context.ToPixels(Button.BorderWidth);
float inset = borderWidth / 2;
diff --git a/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs
index 63fb5da4..a0cbd4d3 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs
@@ -86,7 +86,7 @@ namespace Xamarin.Forms.Platform.Android
_normalBitmap = CreateBitmap(false, width, height);
}
Bitmap bitmap = _normalBitmap;
- using(var paint = new Paint())
+ using (var paint = new Paint())
canvas.DrawBitmap(bitmap, 0, 0, paint);
}
@@ -122,10 +122,10 @@ namespace Xamarin.Forms.Platform.Android
Bitmap CreateBitmap(bool pressed, int width, int height)
{
Bitmap bitmap;
- using(Bitmap.Config config = Bitmap.Config.Argb8888)
+ using (Bitmap.Config config = Bitmap.Config.Argb8888)
bitmap = Bitmap.CreateBitmap(width, height, config);
- using(var canvas = new ACanvas(bitmap))
+ using (var canvas = new ACanvas(bitmap))
{
DrawBackground(canvas, width, height, pressed);
DrawOutline(canvas, width, height);
@@ -136,11 +136,11 @@ namespace Xamarin.Forms.Platform.Android
void DrawBackground(ACanvas canvas, int width, int height, bool pressed)
{
- using(var paint = new Paint { AntiAlias = true })
- using(var path = new Path())
- using(Path.Direction direction = Path.Direction.Cw)
- using(Paint.Style style = Paint.Style.Fill)
- using(var rect = new RectF(0, 0, width, height))
+ using (var paint = new Paint { AntiAlias = true })
+ using (var path = new Path())
+ using (Path.Direction direction = Path.Direction.Cw)
+ using (Paint.Style style = Paint.Style.Fill)
+ using (var rect = new RectF(0, 0, width, height))
{
float rx = Forms.Context.ToPixels(5);
float ry = Forms.Context.ToPixels(5);
@@ -157,11 +157,11 @@ namespace Xamarin.Forms.Platform.Android
void DrawOutline(ACanvas canvas, int width, int height)
{
- using(var paint = new Paint { AntiAlias = true })
- using(var path = new Path())
- using(Path.Direction direction = Path.Direction.Cw)
- using(Paint.Style style = Paint.Style.Stroke)
- using(var rect = new RectF(0, 0, width, height))
+ using (var paint = new Paint { AntiAlias = true })
+ using (var path = new Path())
+ using (Path.Direction direction = Path.Direction.Cw)
+ using (Paint.Style style = Paint.Style.Stroke)
+ using (var rect = new RectF(0, 0, width, height))
{
float rx = Forms.Context.ToPixels(5);
float ry = Forms.Context.ToPixels(5);
@@ -179,7 +179,7 @@ namespace Xamarin.Forms.Platform.Android
{
if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || e.PropertyName == Frame.OutlineColorProperty.PropertyName)
{
- using(var canvas = new ACanvas(_normalBitmap))
+ using (var canvas = new ACanvas(_normalBitmap))
{
int width = Bounds.Width();
int height = Bounds.Height();
diff --git a/Xamarin.Forms.Platform.Android/Renderers/ImageLoaderSourceHandler.cs b/Xamarin.Forms.Platform.Android/Renderers/ImageLoaderSourceHandler.cs
index 541dbeaf..8d0ae3d9 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/ImageLoaderSourceHandler.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/ImageLoaderSourceHandler.cs
@@ -13,7 +13,7 @@ namespace Xamarin.Forms.Platform.Android
var imageLoader = imagesource as UriImageSource;
if (imageLoader != null && imageLoader.Uri != null)
{
- using(Stream imageStream = await imageLoader.GetStreamAsync(cancelationToken).ConfigureAwait(false))
+ using (Stream imageStream = await imageLoader.GetStreamAsync(cancelationToken).ConfigureAwait(false))
return await BitmapFactory.DecodeStreamAsync(imageStream).ConfigureAwait(false);
}
return null;
diff --git a/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs b/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs
index 28f1696e..53426644 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs
@@ -289,7 +289,7 @@ namespace Xamarin.Forms.Platform.Android
{
if (s_dividerHorizontalDarkId == int.MinValue)
{
- using(var value = new TypedValue())
+ using (var value = new TypedValue())
{
int id = global::Android.Resource.Drawable.DividerHorizontalDark;
if (_context.Theme.ResolveAttribute(global::Android.Resource.Attribute.ListDivider, value, true))
diff --git a/Xamarin.Forms.Platform.Android/Renderers/StreamImagesourceHandler.cs b/Xamarin.Forms.Platform.Android/Renderers/StreamImagesourceHandler.cs
index 708ed665..44066975 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/StreamImagesourceHandler.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/StreamImagesourceHandler.cs
@@ -13,7 +13,7 @@ namespace Xamarin.Forms.Platform.Android
var streamsource = imagesource as StreamImageSource;
if (streamsource != null && streamsource.Stream != null)
{
- using(Stream stream = await streamsource.GetStreamAsync(cancelationToken).ConfigureAwait(false))
+ using (Stream stream = await streamsource.GetStreamAsync(cancelationToken).ConfigureAwait(false))
return await BitmapFactory.DecodeStreamAsync(stream).ConfigureAwait(false);
}
return null;
diff --git a/Xamarin.Forms.Platform.Android/Renderers/TableViewModelRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/TableViewModelRenderer.cs
index a7659ed8..ea07dbf2 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/TableViewModelRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/TableViewModelRenderer.cs
@@ -123,7 +123,7 @@ namespace Xamarin.Forms.Platform.Android
bline.SetBackgroundColor(global::Android.Graphics.Color.Transparent);
else
{
- using(var value = new TypedValue())
+ using (var value = new TypedValue())
{
int id = global::Android.Resource.Drawable.DividerHorizontalDark;
if (Context.Theme.ResolveAttribute(global::Android.Resource.Attribute.ListDivider, value, true))
diff --git a/Xamarin.Forms.Platform.Android/Renderers/ToolbarRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/ToolbarRenderer.cs
index f40b75f3..92a774e8 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/ToolbarRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/ToolbarRenderer.cs
@@ -57,7 +57,7 @@ namespace Xamarin.Forms.Platform.Android
else
view = new AButton(Context);
- using(var param = new LinearLayout.LayoutParams(LayoutParams.WrapContent, (int)Context.ToPixels(48), 1))
+ using (var param = new LinearLayout.LayoutParams(LayoutParams.WrapContent, (int)Context.ToPixels(48), 1))
((LinearLayout)Control).AddView(view, param);
}
}
diff --git a/Xamarin.Forms.Platform.Android/ResourcesProvider.cs b/Xamarin.Forms.Platform.Android/ResourcesProvider.cs
index 334ef56a..5c7e1de3 100644
--- a/Xamarin.Forms.Platform.Android/ResourcesProvider.cs
+++ b/Xamarin.Forms.Platform.Android/ResourcesProvider.cs
@@ -27,12 +27,12 @@ namespace Xamarin.Forms.Platform.Android
global::Android.Graphics.Color androidColor = defaultColor;
Context context = Forms.Context;
- using(var value = new TypedValue())
+ using (var value = new TypedValue())
{
if (context.Theme.ResolveAttribute(style, value, true))
{
var styleattrs = new[] { global::Android.Resource.Attribute.TextSize, global::Android.Resource.Attribute.FontFamily, global::Android.Resource.Attribute.TextColor };
- using(TypedArray array = context.ObtainStyledAttributes(value.ResourceId, styleattrs))
+ using (TypedArray array = context.ObtainStyledAttributes(value.ResourceId, styleattrs))
{
fontSize = context.FromPixels(array.GetDimensionPixelSize(0, -1));
fontFamily = array.GetString(1);
diff --git a/Xamarin.Forms.Platform.Android/ViewExtensions.cs b/Xamarin.Forms.Platform.Android/ViewExtensions.cs
index 04a80ef2..12faa1ed 100644
--- a/Xamarin.Forms.Platform.Android/ViewExtensions.cs
+++ b/Xamarin.Forms.Platform.Android/ViewExtensions.cs
@@ -38,7 +38,7 @@ namespace Xamarin.Forms.Platform.Android
public static void SetWindowBackground(this AView view)
{
Context context = view.Context;
- using(var background = new TypedValue())
+ using (var background = new TypedValue())
{
if (context.Theme.ResolveAttribute(global::Android.Resource.Attribute.WindowBackground, background, true))
{
@@ -50,7 +50,7 @@ namespace Xamarin.Forms.Platform.Android
view.SetBackgroundColor(color);
break;
case "drawable":
- using(Drawable drawable = context.Resources.GetDrawable(background.ResourceId))
+ using (Drawable drawable = context.Resources.GetDrawable(background.ResourceId))
view.SetBackgroundDrawable(drawable);
break;
}