AndroidHasFocus.cs 413 Bytes
Newer Older
Mattia's avatar
Mattia committed
1
using System;
Mattia's avatar
Mattia committed
2 3 4
using Android.Views;
using fun5.Droid;
using SampleApp.DependencyServices;
Mattia's avatar
Mattia committed
5 6 7
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;

Mattia's avatar
Mattia committed
8 9
[assembly: Dependency(typeof(focusAndroid))]
namespace fun5.Droid
Mattia's avatar
Mattia committed
10
{
Mattia's avatar
Mattia committed
11
    public class focusAndroid : IIsFocused
Mattia's avatar
Mattia committed
12 13
    {

Mattia's avatar
Mattia committed
14
        public bool isFocused(Xamarin.Forms.View v)
Mattia's avatar
Mattia committed
15
        {
Mattia's avatar
Mattia committed
16
            return v.GetRenderer().View.IsAccessibilityFocused;
Mattia's avatar
Mattia committed
17 18
        }
    }
Mattia's avatar
Mattia committed
19
}