【发布时间】:2014-02-07 09:54:19
【问题描述】:
我有一个自定义绑定的 MvxSpinner,它与我的 Android 和 iOS 应用程序之间共享的 ViewModel 配合得很好。在 Android API 级别 15 (4.0.3) 及更高版本上,一切看起来都很棒,但在 Android API 级别 14 (4.0) 上,微调器为每个 ListItem 元素显示空白文本。 ListItems 在那里,但 Text 只是空白。当我在 Android 4.0 上进行选择时,正确的值将传递回所选项目的 ViewModel,并且我的应用程序会相应更新。
Android 4.0 上的 MxvSpinner 是否存在任何已知错误?
这是我的 MvxSpinner 的 XML:
<MvxSpinner
style="@style/spinner_input"
local:MvxItemTemplate="@layout/item_spinner"
local:MvxDropDownItemTemplate="@layout/item_spinnerdropdown"
local:MvxBind="ItemsSource ProductCategoryOptions; SelectedItem SelectedProductCategory" />
这是我的模板:
item_spinner
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black"
android:text="Test"
local:MvxBind="Text Caption" />
Item_SpinnerDropDown
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
style="?android:attr/spinnerDropDownItemStyle"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
local:MvxBind="Text Caption" />
【问题讨论】:
标签: android xamarin.android xamarin mvvmcross