I use MvvmCross to create PCL. In my Android application, I created mvx.mvxListView, which has an ItemTemplate named itemc.axml. The itemc.axml file is created in the Layout folder, but still it gives this error. Mistake. No resource was found that matches the specified name (in 'MvxItemTemplate' with value '@ layout / itemc')
Why?
My FirstView.axml file is as follows
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res/constD.Droid"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:text="Show Constituencies"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/button1" />
<Mvx.MvxListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
local:MvxBind="ItemsSource Result"
local:MvxItemTemplate="@layout/itemc" />
</LinearLayout>
and my itemc.axml file is as follows.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="40dp"
local:MvxBind="Text name" />
</LinearLayout>
Why is this so?
Suraj source
share