I'm working on a project in which I can use MapFragment or SupportMapFragment as a custom control. I tried to mix custom control(N-18) and Fraggle(N-26) tutorial but I can't make it work.
My Custom Control Class:
public class CustomMapView : MvxFragment
{
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var ignored = base.OnCreateView(inflater, container, savedInstanceState);
return this.BindingInflate(Resource.Layout.CustomMapViewLayout, null);
}
}
My CustomMapViewLayout.axml
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />
In the FirstView.axml I reference the CustomMapView:
<cc.CustomMapView
android:layout_width="match_parent"
android:layout_height="match_parent" />
(I use the ViewNamespaceAbbreviations in the Setup.cs)
When I try to deploy I get these errors:
MvxBind:Error View Type Not Found - cc.CustomMapView (I'm sure the namespace is correct) Android.Views.InflateException:Loading...
Is there anybody who managed to solve this kind problem?