Forum Xamarin Xamarin.Android

ListView Selected Native

I would like to remove the selected native listview and put a custom Select item.

Sugestion? I try e.View.SetBackgroundColor(Android.Graphics.Color.Orange); but my row no change background.


  • CheesebaronCheesebaron DKInsider, University mod

    You need to create a Selector for this.

    Something in the lines of:

    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="">
      <item android:state_enabled="false" android:state_focused="true"
            android:drawable="@drawable/item_disabled" />
      <item android:state_pressed="true"
            android:drawable="@drawable/item_pressed" />
      <item android:state_focused="true"
            android:drawable="@drawable/item_focused" />

    Then set it with:

  • kabelimbhkabelimbh BRMember

    ListView have attribute listSelector in version android 2.3.3?

  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai

    Yes, since API level 1.

Sign In or Register to comment.