J'essaie d'obtenir la mise en page MapView de ressources, mais il renvoie null:Obtenir vue de la mise en page des ressources en Xamarin ou MonoDroid
var map_view = FindViewById<MapView>(Resource.Id.emap);
mylayout.xml comme:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/etklmap"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="@+id/zoomOutButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Zoom Out" />
<com.google.android.maps.MapView
android:id="@+id/emap"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:apiKey="apikey" />
</LinearLayout>
Ainsi est-il possible de obtenir la vue sans appeler SetContentView(Resource.Layout.mylayout);