android - how to copy text from auto complete text box to edit box -


i developing 1 notepad kind of thing in user can enter in edit text, have provided 1 auto complete text view him in writing quick word. not getting how can add word auto text box edit box without disturbing previous written text.

my try: tried code

public void aftertextchanged(editable s){                 string c = s.tostring(); // read content                 ((edittext)view.findviewbyid(r.id.et_text_area)).settext(c);              }             public void beforetextchanged(charsequence s, int start, int count, int after){ }             public void ontextchanged(charsequence s, int start, int before, int count){ }         }); 

which coping text in edit box deleting written text. how can add word autocompletetextview edit box without deleting , when user select word, , word appear in edit box auto text box should become empty.

is there api in android

any appreciated. in advance

try using onitemclicklistener on autocomplete. when user clicks @ word can save position of it. use int value retrieve word specified position of arraylist, adapter or whatever using datasource autocompletelist.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -