summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/AppCompat/FrameRenderer.cs
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2017-01-31 11:49:15 -0800
committerGitHub <noreply@github.com>2017-01-31 11:49:15 -0800
commitae59382c9046501edb37882ad1c065aacce60319 (patch)
tree3578ce8e0396a38aeb8323d4051f50a19a5340fb /Xamarin.Forms.Platform.Android/AppCompat/FrameRenderer.cs
parent23d228039acc504049f6a5153f5839d4c714930a (diff)
downloadxamarin-forms-ae59382c9046501edb37882ad1c065aacce60319.tar.gz
xamarin-forms-ae59382c9046501edb37882ad1c065aacce60319.tar.bz2
xamarin-forms-ae59382c9046501edb37882ad1c065aacce60319.zip
[All] Basic Accessibility Support (#713)
* [Core] Add accessibility properties * [Controls] Add accessibility gallery * [iOS] Implement accessibility properties * [Android] Implement accessibilty properties * [Win] Implement accessibility properties * [Win] Select ListView item on selected for a11y * Update docs * TODO: macOS accessibility * [iOS] Fix failing UI Tests
Diffstat (limited to 'Xamarin.Forms.Platform.Android/AppCompat/FrameRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/FrameRenderer.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/FrameRenderer.cs b/Xamarin.Forms.Platform.Android/AppCompat/FrameRenderer.cs
index 1092f767..6954654b 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/FrameRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/FrameRenderer.cs
@@ -21,6 +21,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
float _defaultElevation = -1f;
float _defaultCornerRadius = -1f;
+ int? _defaultLabelFor;
bool _clickable;
bool _disposed;
@@ -106,6 +107,14 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
ContentDescription = Element.AutomationId;
}
+ void IVisualElementRenderer.SetLabelFor(int? id)
+ {
+ if (_defaultLabelFor == null)
+ _defaultLabelFor = LabelFor;
+
+ LabelFor = (int)(id ?? _defaultLabelFor);
+ }
+
VisualElementTracker IVisualElementRenderer.Tracker => _visualElementTracker;
void IVisualElementRenderer.UpdateLayout()