I love the solution, there is nothing wrong with TextWatcher ().
you must use the code below In the code below, I did not override the "performFiltering" method, I added it, and my automatic full text field now works fine.
Public class CustomAutoCompleteView extends AutoCompleteTextView {
public CustomAutoCompleteView(Context context) { super(context); // TODO Auto-generated constructor stub } public CustomAutoCompleteView(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub } public CustomAutoCompleteView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); // TODO Auto-generated constructor stub } @Override protected void performFiltering(final CharSequence text, final int keyCode) { String filterText = ""; super.performFiltering(filterText, keyCode); } /** * After a selection, capture the new value and append to the existing * text */ @Override protected void replaceText(final CharSequence text) { super.replaceText(text); }
}
Shikha
source share