Listview Selected Item Background Color

2»

Posts

  • TarasBountyTarasBounty Member
    edited September 2019

    Any updates?

  • MO35ABMO35AB Member

    Its from the android side :smile:
    Add this to your android styles.xml file under your main theme:

    <resources>
      <style name="MyTheme" parent="android:style/Theme.Material.Light.DarkActionBar">
       <item name="android:colorPressedHighlight">@color/ListViewSelected</item>
       <item name="android:colorLongPressedHighlight">@color/ListViewHighlighted</item>
       <item name="android:colorFocusedHighlight">@color/ListViewSelected</item>
       <item name="android:colorActivatedHighlight">@color/ListViewSelected</item>
       <item name="android:activatedBackgroundIndicator">@color/ListViewSelected</item>
      </style>
    <color name="ListViewSelected">#96BCE3</color>
    <color name="ListViewHighlighted">#E39696</color>
    </resources>
    

    new here can't add links, however here you go :

    https:// stackoverflow.com/questions/25885238/xamarin-forms-listview-set-the-highlight-color-of-a-tapped-item

    dont kick me please.

  • LouissLouiss Member ✭✭
    edited February 11

    The easiest way I found was adding to the style sheet on android:

Sign In or Register to comment.