0 android mvvmcross xamarin mvxbind
我已经使用MvvmCross超过2年了,但这个最新的Android问题已经难倒了.我显然遗漏了一些东西.
我使用最新版本升级了我的Xamarin和MonoDevelop.我一直在使用Mvx热金枪鱼3.5并尝试升级到3.5.1,没有不同的结果.基本上每个使用绑定的单个视图都会与MvxBind失败:输出窗口中的错误视图只是空白.
我也通过尝试手动提供程序集以及名称空间来更改安装程序类.我急需解决这个问题,斯图尔特请指教.
MvxBind:Error:100,93 View type not found - md52d382d08e2b5b5a41f8bed5ba30f5cc4.BindableListView
Run Code Online (Sandbox Code Playgroud)
一个例子是我的配置视图中的绑定.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/style_background">
<Monovage.BindableListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:cacheColorHint="#00000000"
local:MvxBind="ItemsSource Thresholds"
local:MvxItemTemplate="@layout/listitem_usagethreshold"
android:layout_marginTop="0dp" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:orientation="vertical"
android:background="@drawable/style_background">
<ProgressBar
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="false"
android:layout_centerInParent="true"
local:MvxBind="Visibility IsBusy, Converter=Visibility" />
</RelativeLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
Bindable List View是一个继承自MvxListView的列表视图
public class BindableListView:MvxListView
小智 7
我昨天刚刚使用BindingFlowLayout处理了这个问题.我通过调整布局文件中的前缀解决了MvxBind:Error ...
<BindingFlowLayout
android:id="@+id/AllShowsFlow"
android:orientation="horizontal"
local:MvxItemTemplate="@layout/appmoviesgriditem"
local:MvxBind="ItemsSource TVShows"
android:minWidth="25px"
android:minHeight="25px"
android:layout_marginLeft="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Run Code Online (Sandbox Code Playgroud)
并添加程序集设置.
protected override IList<Assembly> AndroidViewAssemblies
{
get
{
var assemblies = base.AndroidViewAssemblies;
assemblies.Add(typeof(MvxExtensions.BindingFlowLayout).Assembly);
assemblies.Add(typeof(MvxExtensions.FlowLayout).Assembly);
return assemblies;
}
}
Run Code Online (Sandbox Code Playgroud)
基于Stuart的回答:
MvxBind:错误:找不到视图类型 - mvvmemiextensions.EmiDatePicker
但是,这个错误在我的应用程序中是良性的,它从来没有引起任何问题.
我有同样的问题,但使用BindableExpandableListView,我得到了错误
[MvxBind] 237.25 View type not found - md58cb9ccb4af6afc62c0aa8757d7b275d0.BindableExpandableListView
Run Code Online (Sandbox Code Playgroud)
我在布局文件中有这个
<DeapExtensions.Binding.Droid.Views.BindableExpandableListView
android:id="@+id/openExpandableListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
android:stackFromBottom="false"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="15dp"
local:MvxBind="ItemsSource WrappedCategories"
local:MvxItemTemplate="@layout/rowopentask"
local:GroupItemTemplate="@layout/rowcategory" />
Run Code Online (Sandbox Code Playgroud)
我刚刚删除了所有的前缀
<BindableExpandableListView
android:id="@+id/openExpandableListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawSelectorOnTop="true"
android:stackFromBottom="false"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="15dp"
local:MvxBind="ItemsSource WrappedCategories"
local:MvxItemTemplate="@layout/rowopentask"
local:GroupItemTemplate="@layout/rowcategory" />
Run Code Online (Sandbox Code Playgroud)
这似乎有效.
| 归档时间: |
|
| 查看次数: |
1014 次 |
| 最近记录: |