AndroidReadText.cs 451 Bytes
Newer Older
Mattia's avatar
Mattia committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
using System;
using SampleApp.DependencyServices;
using SampleApp.Droid;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;

[assembly: Dependency(typeof(AndroidReadText))]
namespace SampleApp.Droid
{
    public class AndroidReadText : IReadText
    {
        public AndroidReadText()
        {
        }


        public void ReadText(Label t)
        {
            t.GetRenderer().View.AnnounceForAccessibility(t.Text);
        }
    }
}