我正在开发一个跨平台的应用程序,在 android 中启动它。我找到了你的 MVVMCross 项目,我正在尝试进入它。现在我对它完全陌生,不知道如何将我的 WebService-Results 绑定到我的 ListView。这里以 XAML 为例,我是如何尝试的:
xmlns:mobsales="http://schemas.android.com/apk/res/MobSales.DroidUI"
...
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
mobsales:MvxItemTemplate="@layout/listitem_customer"
mobsales:MvxBind="{'ItemSource':{'Path':'Customer'}}" />
...
看起来像这样
<cirrious.mvvmcross.binding.android.views.MvxBindableListView
android:id="@+id/autocomplete"
android:layout_below="@id/txtfield"
android:layout_centerHorizontal="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
mobsales:MvxItemTemplate="@layout/listitem_customer"
mobsales:MvxBind="{'ItemSource':{'Path':'Customers'}}" />
当我悬停最后两行时,工具提示说属性未声明。我真的不知道你是怎么做到的。你能给我一些建议吗?我想我必须在我的 UI 项目的 Values 中写一些 xml,对吧?
另一个问题:如何使用 AutoCompleteTextViews?我必须先为它编写自己的 MvXBindables 吗?有什么建议吗?:-)