In Email compose, when user types/selects email ids in to/cc/bcc. Suppose there are 7-8 email ids and now user want to delete 3rd one. It is very difficult for user to go to 3rd one and delete that one. So I think solution for this is,
(please refer figure below from Yahoo email composer)
I need similar functionality. How can I achieve in android? Is there any standard component I can use? Currently I am using auto complete text view for To, Cc, Bcc. Please help. Thank you in advance.
I don't have time to write up working code, but I will point you in the right direction. The key for doing funky things with text in standard components like EditText
are called "spans".
Suggested plan of attack:
TextWatcher
to your EditText
so you know when the text changes. Bitmap
equivalent using standard drawing APIs (ie create Canvas
, measure text, draw background, draw text). ImageSpan
(this is kinda the key to the whole thing) using your bitmap as the constructor argument. setSpan()
on that single character to have your ImageSpan
replace it's appearance.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.