Я создаю приложение и использую Search View с адаптером пользовательского списка, когда я ищу любой текст, тогда он показывает черный диалог с поиском текста, но я хочу удалить это черное диалоговое окно и другая проблема, когда я выбираю любую запись, которая выбирает запись в соответствии с первоначальным списком, пожалуйста, помогите мне как можно скорее.Я создаю приложение и используя поиск Просмотр
private LayoutInflater inflater;
private TextView name_textView, f_name_textView, m_name_textView,
h_number_textView;
private ArrayList<SeccUserListAdapterBean> list;
private ArrayList<SeccUserListAdapterBean> list1;
public SeccUserListAdapter(Context context,
ArrayList<SeccUserListAdapterBean> list) {
super();
this.list = list;
inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return list.size();
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
@SuppressLint("InflateParams")
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
if (convertView == null)
convertView = inflater.inflate(R.layout.seccuserlistlayout, null);
name_textView = (TextView) convertView.findViewById(R.id.textView1);
f_name_textView = (TextView) convertView.findViewById(R.id.textView2);
m_name_textView = (TextView) convertView.findViewById(R.id.textView3);
h_number_textView = (TextView) convertView.findViewById(R.id.textView4);
name_textView.setText(list.get(position).getBen_name());
f_name_textView.setText(list.get(position).getBen_fname());
m_name_textView.setText(list.get(position).getBen_gender());
h_number_textView.setText(list.get(position).getBen_house_no());
return convertView;
}
@Override
public Filter getFilter() {
// TODO Auto-generated method stub
return new Filter() {
@SuppressLint("DefaultLocale")
@Override
protected FilterResults performFiltering(CharSequence constraint) {
// TODO Auto-generated method stub
final FilterResults oReturn = new FilterResults();
final ArrayList<SeccUserListAdapterBean> results = new ArrayList<SeccUserListAdapterBean>();
if (list1 == null)
list1 = list;
if (constraint != null) {
if (list1 != null && list1.size() > 0) {
for (final SeccUserListAdapterBean family : list1) {
if (family
.getBen_name()
.toLowerCase()
.contains(
constraint.toString().toLowerCase()))
results.add(family);
}
}
oReturn.values = results;
}
return oReturn;
}
@SuppressWarnings("unchecked")
@Override
protected void publishResults(CharSequence constraint,
FilterResults results) {
// TODO Auto-generated method stub
list = (ArrayList<SeccUserListAdapterBean>) results.values;
notifyDataSetChanged();
}
};
Спасибо за немедленный ответ .... если вы знаете мои первые вопросы, ответьте, тогда я был бы очень благодарен вам ... как я могу удалить это диалоговое окно с поиском текста – user3839710