Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

NuGet Xamarin Google Android Material : Bad Scrolling performance with ListView

Hello everyone !
I've installed the Xamarin Google Android Material NuGet in my project and I have an issue with my ListView.

The performance scrolling is really bad. When I want to make a huge scroll, it's stops immediately scrolling when my finger is away from the screen.

Do you have any tips to resolve this issue ?

Thanks !

Best Answer

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited October 7

    I created a basic sample to test the function, the scrolling of the listView works fine on AndroidX. Check the gif:

    How did you test the nuget? The library should be used for the AndroidX project. Please make sure you've migrated to AndroidX properly. Tutorial: https://developer.android.com/jetpack/androidx/migrate

    Try to update the packages to the lastest statable version and test again.

  • Seb_GlanumSeb_Glanum Member ✭✭

    Okay i'm going to try this ! The reason is about the most popular nuget on badge https://github.com/xabre/xamarin-forms-tab-badge.
    The installation requires to install Android materials nugets.

  • Seb_GlanumSeb_Glanum Member ✭✭

    So I have some issues with nugets which are using android's older library.
    Xamarin.AndroidX.AppCompat.Resources, referenced by Xamarin.Forms.Platform.Android. Please add a NuGet package or assembly reference for Xamarin.AndroidX.AppCompat.Resources, or remove the reference to Xamarin.Forms.Platform.Android.

    I have the same issue with a nuget using an older library. How I can resolve this ?

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited October 8

    The installation requires to install Android materials nugets.

    After installing the Plugin.Badge package and creating the custom renderer class. Migrate the Android platform project to AndroidX. Then install the Xamarin.Google.Android.Material package. Because the nuget require the dependencies, we need to install these package first.

    Here are the packages which you need to install.

    <local:CustomTabbedPage ...
            xmlns:plugin="clr-namespace:Plugin.Badge.Abstractions;assembly=Plugin.Badge.Abstractions" 
            xmlns:local="clr-namespace:TodoREST"
            x:Class="TodoREST.TabbedPage1">
        <ContentPage Title="Tab 1" plugin:TabBadge.BadgeText="5"/>
        <ContentPage Title="Tab 2" />
        <ContentPage Title="Tab 3" plugin:TabBadge.BadgeText="12"/>
    </local:CustomTabbedPage>
    

    This the screenshot of the result:

  • Seb_GlanumSeb_Glanum Member ✭✭

    Sorry if I misspoke, but this isn't about this nuget it's about two others nugets I have and when I want to build my app and this is exactly what the console says :

    error XA2002: Can not resolve reference : 'Xamarin.Android.Support.v7.AppCompat', referenced by Plugin.Iconize. Please add a NuGet package or assembly reference for 'Xamarin.Android.Support.v7.AppCompat', or remove the reference to 'Plugin.Iconize'.

    error XA2002: Can not resolve reference : 'Xamarin.Android.Support.Design', referenced by VectorIcon.FormsPlugin.Android. Please add a NuGet package or assembly reference for 'Xamarin.Android.Support.Design', or remove the reference to 'VectorIcon.FormsPlugin.Android'.

    I have already installed all the packages you said for the migration, I've used the migration tool.

  • Seb_GlanumSeb_Glanum Member ✭✭

    Does that mean these nugets cannot work with AndroidX ?

  • Seb_GlanumSeb_Glanum Member ✭✭

    Okay ! I'll try this ! Thank you for your time !

Sign In or Register to comment.