Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Find Android Native View

$
0
0

We have added a a Xamarin.Forms.Maps in a PCL xaml view and now to implement custom options, we have accessed to it from the Windows Phone Project so easy using VisualTreeHelper but how can I find the native map using Android because we do not have the ID neither we know what to put in the MainActivity to find the map view:

string resourcename = String.Concat(ApplicationContext.PackageName,":id/mymap");
var id = this.Resources.GetIdentifier(resourcename, "id", "com.google.android.maps");
id = this.Resources.GetIdentifier(resourcename, "id", "com.google.maps.android");
id = this.Resources.GetIdentifier(resourcename, "id", "com.google.android.gms.maps.MapFragment");
var control = FindViewById(id);

Any way to find the Map view?

Hope there is a way.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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