Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Get screen coordinates from Element for both Android and iOS?

$
0
0

I am trying to write a tutorial overlay, otherwise known as ShowcaseView or Coach Markups or Instructional overlay, component. I can handle the custom renderers and putting overlays on top of both Android and iOS screens. My problem though is knowing where the Elements are in screen coordinates specific to each platform to actually highlight the element. To make coding from the shared code side easy, I wanted to just specify the XF element as input to the tutorial overlay and make the tutorial overlay figure out what that Element's screen coordinates are. That is where I am stuck. Is there a nice way of taking an Element and getting the platform specific screen coordinates?

I tried using AutomationId and then scanning the UI hierarchy looking for that AutomationId (AccessibilityIdentifier in iOS), but it doesn't always work. For example, ToolBarItems do not support AutomationId (on Android at least) so I couldn't use it.

Any suggestions?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>