android - Selector drawable strange behavior: why does it get stuck in the middle of the screen? -


i've tried several combinations of selectors, end result same. though selector displayed correctly, if go or down selector stays in middle of screen. it's issue, couldn't make work or other solutions i've found.

here selecting row:

enter image description here

and scrolling down:

enter image description here

my listview:

<listview     android:id="@+id/cardlistview"     android:background="@android:color/black"     android:listselector="@drawable/list_view_selector"     android:layout_width="fill_parent"     android:layout_height="fill_parent"/> 

my list_view_selector.xml

<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android">     <item         android:state_selected="true"         android:drawable="@drawable/background_selected" />     <item         android:drawable="@drawable/background_selected" /> </selector> 

and background_selected

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"     android:shape="rectangle" >      <gradient         android:angle="90"         android:centercolor="#ffffff"         android:endcolor="#ffffff"         android:startcolor="#ffffff" />  </shape> 

thanks in advance.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -