bool IViewHierarchyHandler.TryGetRepresentedView(object view, bool withSubviews, out IInspectView representedView)
        {
            var androidView = view as View;

            if (androidView != null)
            {
                representedView = new AndroidInspectView(androidView, withSubviews);
                return(true);
            }

            representedView = null;
            return(false);
        }
        bool IViewHierarchyHandler.TryGetHighlightedView(double x, double y, bool clear, out IInspectView chosenView)
        {
            chosenView = null;

            if (highlightedView != null)
            {
                highlightedView.SetBackgroundDrawable(highlightedViewOriginalBackground);
                highlightedView = null;
                highlightedViewOriginalBackground = null;
            }

            var view = GetViewAt(GetTopActivity(), x, y);

            if (view == null)
            {
                return(false);
            }

            if (!clear)
            {
                highlightedView = view;
                highlightedViewOriginalBackground = this.highlightedView.Background;

                var gd = new GradientDrawable();
                gd.SetColor(AG.Color.Red.ToArgb());
                gd.SetAlpha(255 / 2);
                //gd.SetCornerRadius (5);
                //gd.SetStroke (1, AG.Color.Red);

                Drawable highlightedBackground;
                if (highlightedViewOriginalBackground == null)
                {
                    highlightedBackground = gd;
                }
                else
                {
                    highlightedBackground =
                        new LayerDrawable(new [] { highlightedViewOriginalBackground, gd });
                }

                highlightedView.SetBackgroundDrawable(highlightedBackground);
            }

            chosenView = new AndroidInspectView(view, withSubviews: false);
            return(true);
        }