Skip to main content

Posts

Showing posts with the label xmarin

ListView change background color for selected items ( Xamarin - Android )

Issue: How to change  background color for all selected items in Android Fix: ( Xamarin  - c# syntax - Android should work with little change)      myListView . ItemClick   += ( sender ,   e )   = >   {                 myListView . GetChildAt (   e . Position ) . SetBackgroundColor (   Color . White ) ;                              } ; This will show the color change on all selected items. If you use myListView _ItemSlected event -> The color only shows like a highlight and when you select the next item the background color changes back to default.