android - Changing the state of selector after list item has been pressed -
i've used list selector display different colours depending on the state (selected , otherwise). below listselector code:
//orange on selected <item android:drawable="@color/orange" android:state_selected="true"/> //black otherwise <item android:drawable="@color/black"/>
in main activity set view : view.setselected(true);
however after selecting list item, colour still orange.
does know how resolve this?
you using wrong state color, need use activated
state.
check out question had on this
Comments
Post a Comment