splitwise / TokenAutoComplete

Gmail style MultiAutoCompleteTextView for Android
Apache License 2.0
1.3k stars 383 forks source link

tokens and drawable pressed state #185

Closed wrozwad closed 8 years ago

wrozwad commented 8 years ago

a) They're possibility to change a drawable during press on a token? I want to use TokenCompleteTextView.TokenClickStyle.Delete and I like to give users a feedback on any onclick events.

Unfortunately set selector with pressed state as background drawable for a token view doesn't work.

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/chips_bcg_pressed" android:state_pressed="true"/>
    <item android:drawable="@drawable/chips_bcg_normal"/>
</selector>

b) Also when I touch down the token, decide "No, not this one!", swipe out and then touch up, token was still deleted. Any options to avoid that?

mgod commented 8 years ago

a) No, sorry. The tokens don't have normal selection states. b) You should use TokenClickStyle.Select if you want to have confirmation before deleting a token.