summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBradChase2011 <brchase07@yahoo.com>2017-03-07 15:25:05 (GMT)
committerRui Marinho <me@ruimarinho.net>2017-03-07 15:25:05 (GMT)
commit2b92142ab2a501de71d3572efc0e5deb2b7bae9a (patch)
tree263f7370b5cff715cbb8091c821c86b54f530a05
parent917d27e079a23c96ee3201cc7f35069cd837ed9a (diff)
downloadxamarin-forms-2b92142ab2a501de71d3572efc0e5deb2b7bae9a.zip
xamarin-forms-2b92142ab2a501de71d3572efc0e5deb2b7bae9a.tar.gz
xamarin-forms-2b92142ab2a501de71d3572efc0e5deb2b7bae9a.tar.bz2
Fixed issue where errant "." were appearing on droid controls due to hints. (#801)
-rw-r--r--Xamarin.Forms.Platform.Android/ViewRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/VisualElementRenderer.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Android/ViewRenderer.cs b/Xamarin.Forms.Platform.Android/ViewRenderer.cs
index 31a9c28..ee5913b 100644
--- a/Xamarin.Forms.Platform.Android/ViewRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/ViewRenderer.cs
@@ -223,7 +223,7 @@ namespace Xamarin.Forms.Platform.Android
if (_defaultHint == null)
_defaultHint = textView.Hint;
- var elemValue = string.Join(". ", (string)Element.GetValue(Accessibility.NameProperty), (string)Element.GetValue(Accessibility.HintProperty));
+ var elemValue = string.Join((String.IsNullOrWhiteSpace((string)(Element.GetValue(Accessibility.NameProperty))) || String.IsNullOrWhiteSpace((string)(Element.GetValue(Accessibility.HintProperty)))) ? "" : ". ", (string)Element.GetValue(Accessibility.NameProperty), (string)Element.GetValue(Accessibility.HintProperty));
if (!string.IsNullOrWhiteSpace(elemValue))
textView.Hint = elemValue;
diff --git a/Xamarin.Forms.Platform.Android/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Android/VisualElementRenderer.cs
index 68f5d7d..3986a6d 100644
--- a/Xamarin.Forms.Platform.Android/VisualElementRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/VisualElementRenderer.cs
@@ -388,7 +388,7 @@ namespace Xamarin.Forms.Platform.Android
if (_defaultHint == null)
_defaultHint = textView.Hint;
- var elemValue = string.Join(". ", (string)Element.GetValue(Accessibility.NameProperty), (string)Element.GetValue(Accessibility.HintProperty));
+ var elemValue = string.Join((String.IsNullOrWhiteSpace((string)(Element.GetValue(Accessibility.NameProperty))) || String.IsNullOrWhiteSpace((string)(Element.GetValue(Accessibility.HintProperty)))) ? "" : ". ", (string)Element.GetValue(Accessibility.NameProperty), (string)Element.GetValue(Accessibility.HintProperty));
if (!string.IsNullOrWhiteSpace(elemValue))
textView.Hint = elemValue;