问题
Basically what I want to create can be best illustrated from a screenshot.
I have a listview of people just like FB Messenger app. I want the ability for my users to have a search bar like the one shown in the screenshots. It should have the following properties:
1) Search bar should preview names of people selected in the list view
2) People can be de-selected by hitting backspace on any name in the preview search bar
3) The search bar should be able to filter the bottom list of people as the user types.
I have a solution for propert 3) but I am clueless about the other two. Please HELP!!!
回答1:
You should check out this.
This class uses combination of TextWatcher, SpannableString, AutoCompleteTextView and Annotations.
来源:https://stackoverflow.com/questions/20006825/how-do-i-achieve-a-facebook-messenger-google-hangouts-like-layout-to-preview-se