NobsterTheLobster / Xamarin.Forms.GridView

GridView for xamarin forms
MIT License
60 stars 10 forks source link

Android example project: Unclear behavoir of select/unselect #4

Closed repthor closed 7 years ago

repthor commented 7 years ago

When I tap on AliceBlue, then AntiqueWhite, last on Aqua, only Aqua has its frame in the end.

Now I scroll the page down, to have Beige on the upper end of the screen. I tap Beige, Bisque and Black in this order. This time, all three tapped color tiles stay selected. If I scroll them out of sight and back in again - only Black has a frame (as expected from beginning).

NobsterTheLobster commented 7 years ago

The RecyclerView API is extensive; It was FindViewHolderForAdapterPosition I needed instead of GetChildAt. Fingers crossed I have it right this time.

NobsterTheLobster commented 7 years ago

Seems like its working to me but I'll leave this issue open until you check it out just in case there is still something wrong.

repthor commented 7 years ago

Now Android works fine. Thank You!

May be, I made a mistake, but i cannot build the iOS-Version: At Line 94 of GridViewRenderer.cs :

1>C:\Users\Astera\Downloads\Xamarin.Forms.GridView-master (4)\Xamarin.Forms.GridView-master\XamarinFormsGridView\XamarinFormsGridView.iOS\Renderers\GridViewRenderer.cs(94,33,94,48): error CS1061: 'GridCollectionView' does not contain a definition for 'SelectionEnable' and no extension method 'SelectionEnable' accepting a first argument of type 'GridCollectionView' could be found (are you missing a using directive or an assembly reference?)

NobsterTheLobster commented 7 years ago

Oops sorry about that. I thought I tested it but yeah I removed the SelectionEnable property which was a carry from the orginal TwinTech source. I obviously left a reference behind. I think I fixed the repo but if your still having bother just comment out any reference to SelectionEnable.

NobsterTheLobster commented 7 years ago

Oh on a completely separate note. If your targeting xamarin 2.3.5.233-pre1 then on the android renderer you need to do a find for BindingFlags.NonPublic and change it to BindingFlags.Public. I will hopefully find a solution that makes it compatible with either version.