Я использую earSearchableSpinner в своем проекте Android, а в моем SearchableSpinner я использую два textview, поэтому я создал специальный адаптер. Когда я нажимаю SearchableSpinner, данные не отображаются должным образом.


Вот мой пользовательский код адаптера. Я использую getView и getDropDownview в своем настраиваемом адаптере.
private ArrayList<University> universityList;
private Activity context;
public UniversityListAdapterForUploadPage(ArrayList<University> universityList, Activity context){
super(context,R.layout.university_list_row_for_spinner,universityList);
this.universityList = universityList;
this.context = context;
}
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
LayoutInflater layoutInflater = context.getLayoutInflater();
View customView = layoutInflater.inflate(R.layout.university_list_row_for_spinner,null,true);
TextView universityIDText = customView.findViewById(R.id.universityID_textView_for_spinner);
TextView universityNameText = customView.findViewById(R.id.university_name_textView_for_spinner);
University university = universityList.get(position);
universityIDText.setText(university.getUniversityID()+"");
universityNameText.setText(university.getUniversityName());
return customView;
}
@Override
public View getDropDownView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
LayoutInflater layoutInflater = context.getLayoutInflater();
View customView = layoutInflater.inflate(R.layout.university_list_row_for_spinner,null,true);
TextView universityIDText = customView.findViewById(R.id.universityID_textView_for_spinner);
TextView universityNameText = customView.findViewById(R.id.university_name_textView_for_spinner);
University university = universityList.get(position);
universityIDText.setText(university.getUniversityID()+"");
universityNameText.setText(university.getUniversityName());
return customView;
}
Мне нужна помощь.