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:
and scrolling down:
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
Post a Comment