Answer the question
In order to leave comments, you need to log in
How to override the method in AppCompatAutoCompleteTextView in such a variant?
Good, explain in an accessible way how to override the method differently.
What is
writeNameProductConsist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
//бла-бла
}
});
public class ExpansionAutoCompleteTextView extends AppCompatAutoCompleteTextView implements TextWatcher {
@Override
public void setOnItemClickListener(AdapterView.OnItemClickListener l) {
super.setOnItemClickListener(l);
l.onItemClick(/**что тут писать?*/);
}
Answer the question
In order to leave comments, you need to log in
If I understand correctly, do not write anything there. In the class constructor, just call
this.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
//бла-бла
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question