MvvmCross를 사용하여 내 Xamarin Android 앱에 맞춤 회 전자를 보유하고 있습니다. 커스텀을 사용하는 유일한 이유는 모델에 클래스가 포함되어 있고 스피너가 해당 클래스의 속성으로 값을 채우길 원하기 때문입니다. 그러나 드롭 다운의 모양은 내 응용 프로그램의 나머지 부분처럼 보이지 않습니다. 오른쪽에 라디오 버튼이 없으므로 띄어쓰기가 꺼져 있습니다. 이 맞춤형 회 전자가 나머지처럼 보이게하려면 어떻게해야합니까?MvvmCross 맞춤형 회 전자 기본 모양 유지
<Mvx.MvxSpinner
style="@style/spinner_input"
local:MvxItemTemplate="@layout/item_spinner"
local:MvxDropDownItemTemplate="@layout/item_spinnerdropdown"
local:MvxBind="ItemsSource ProductCategoryOptions; SelectedItem SelectedProductCategory" />
Item_Spinner.axml -이 부분은 제대로 된 것 같습니다. 일단 값을 선택하면 드롭 다운의 모양이 다른 것처럼 보입니다.
<?xml version="1.0" encoding="utf-8"?>
<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.axml -이 파일이 잘못되었다고 생각합니다. 드롭 다운의 모양이 일치하지 않습니다.
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView 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" />