[android-developers] AutoCompleteTextView cursor position.
Hi Everyone,
I'm having a very simple issue i.e. the cursor goes to the front of
the text when item is selected from my ArrayList in emulator.
here is the sample code:
SimpleAdapter sa = new SimpleAdapter(this, myArrayList,
R.layout.contacts, new String[] { "name", "number" }, new int [] {
R.id.name, R.id.num });
myAutoText.setAdapter(sa);
myAutoText.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int pos, long id) {
String num = myArrayList.get(pos).get("NUM");
myAutoText.dismissDropDown();
myAutoText.setText(num);
myAutoText.performCompletion();
}
}
And still I see cursor is positioned at start of the text in TextBox
and dropdown is shown with selected item.
Minimum API selected is 9.
Thanks in advance.
Lakshman
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home