Ich möchte eine benutzerdefinierte RecyclerView zu Gruppierungsabschnitt zu erstellen.Xamarin.Android - Custom RecyclerView mit Gruppenkopf
Ich benutze Xamarin.Android mit MVVMCross, und ich sah this repo, um eine RecyclerView mit Gruppierung zu machen.
Nun, ich kopiere alle seine Dateien und versucht, meine Lösung zu kompilieren (weil ich muss MVVMCross 5.0.5 verwenden):
ich diese einfache Seite gemacht:
<?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="match_parent"
android:layout_height="match_parent">
<androidapp.controls.MvxRecyclerView
android:id="@+id/my_recycler_view"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
local:MvxItemTemplate="@layout/listitem_recyclerviewexample"
MvxHeaderLayoutId="@layout/recyclerviewexample_header"
MvxFooterLayoutId="@layout/recyclerviewexample_footer"
MvxHidesHeaderIfEmpty="true"
MvxHidesFooterIfEmpty="true"
local:MvxBind="ItemsSource Items; ItemClick ItemSelected"/>
</LinearLayout>
Aber ich habe diesen Fehler, wenn meine Seite angezeigt wird:
{Android.Views.InflateException: B inary XML-Datei Zeile # 1: Fehler Klasse MvxRecyclerView aufladen ---> Java.Lang.ClassNotFoundException: Klasse "android.view.MvxRecyclerView" nicht gefunden auf Pfad: DexPathList [[zip-Datei "/ data/app/com.companyname.AndroidApp-1/Base ...}
Und
{java.lang.ClassNotFoundException: Hat Klasse "android.view.MvxRecyclerView" nicht auf dem Pfad finden: DexPathList [[zip-Datei "/data/app/com.companyname.AndroidApp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.companyname.AndroidApp-1/lib/arm64, /data/app/com.compa...}
Danke für Ihre Hilfe
EDIT: Jetzt habe ich diesen Fehler (ich habe meine axml Code aktualisiert):
{ System.NullReferenceException: Objektreferenz wurde nicht auf eine Instanz eines Objekts festgelegt. bei MvvmCross.Platform.Mvx.Resolve [TService] () [0x00006] in C: \ projects \ mvvmcross \ MvvmCross \ Platform \ Platform \ Mvx.cs: 33 bei MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContextHelpers.Current [T] () [0x00000] in C: \ projects \ mvvmcross \ mvvmCross \ Binding \ Droid \ Binding \ MvxAndroidBindingContextHelpers.cs: 23 bei MvvmCross.Binding.Droid.BindingContext.MvxAndroidBindingContextHelpers.Current () [0x00000 ] in C: \ Projekte \ mvvmcross \ MvvmCross \ Bindung \ Droid \ BindingContext \ MvxAndroidBindingContextHelpers.cs: 17 bei AndroidApp.Controls.MvxRecyclerAdapter..ctor() [0x00000] in /Benutzer/Projekte/AndroidApp/AndroidApp/Controls /MvxRecyclerAdapter.c s: 34 bei AndroidApp.Controls.MvxRecyclerView..ctor (Android.Content.Context Kontext, Android.Util.IAttributeSet attrs) [0x00000] in /Users/Projects/AndroidApp/AndroidApp/Controls/MvxRecyclerView.cs:16 bei (wrapper dynamic-Methode) System.Object: 1d68a509-a758-45e2-be4d-f4a51a401ff5 (IntPtr, Objekt [])
bei Java.Interop.TypeManager.n_Activate (System.IntPtr JNIEnv, System.IntPtr JClass , System.IntPtr typenname_ptr, System.IntPtr signature_ptr, System.IntPtr-Projekt, System.IntPtr parameters_ptr) [0x000de] in: 0}
nie diesen Fehler habe aber festgestellt, so etwas wie [dieses] (https://stackoverflow.com/questions/17864211/error-inflating-mvx-mvximageview) . –