Pinned List View "Please use the Adapter property setter"

asyasy TRMember
edited July 2015 in Xamarin.Android

Hi i try Pinned List View
I download this: https://github.com/benbishop/Xamarin-PinnedHeaderListView

But i received this warning

What can i do?

Thanks

11.png 101.8K

Answers

  • LoriLalondeLoriLalonde CAInsider, University, Developer Group Leader ✭✭✭

    Replace the list.SetAdapter(adapter) line with:

    list.Adapter = list;
    
  • asyasy TRMember

    It works

    Last two warning what can i do?

  • LoriLalondeLoriLalonde CAInsider, University, Developer Group Leader ✭✭✭

    Replace it with:

            public override IListAdapter Adapter
            {
                get
                {
                    return base.Adapter;
                }
                set
                {
                    base.Adapter = value;
                    mAdapter = (IPinnedHeaderAdapter)adapter;
                }
            }
    
  • RafaelDavidCastroLunaRafaelDavidCastroLuna USMember
    edited November 2016

    If you had, mListView.SetAdapter(adapter), you should replace it with: mListView.Adapter = adapter;

  • vinothswamivinothswami Member ✭✭

    Replace the list.SetAdapter(adapter) line with:

    list.Adapter = list;

    its wokring...

Sign In or Register to comment.