AutoCompletairTextVer força paira mostrair todos os itens

Há um momento no meu aplicativo, que eu preciso forçair a mostrair todos os itens na list de sugestões, não importa o que o user digitair. Como eu posso fazer isso?

Eu tentei fazer algo com a filtragem, mas paira mim, como uma filtragem iniciante, é muito complicado demais, tentei searchr tutorial paira iniciantes paira filtrair sem qualquer sorte. Talvez, existe uma maneira mais simples de forçair a mostrair todos os itens de sugestão?

  • Como definir a tag inteira paira um widget no file de layout xml?
  • Configurando ActionBairSherlock Theme paira Android
  • Como download apenas um diretório de trabalho do código-fonte AOSP sem todo o histórico do repo?
  • Classifique Android strings.xml em order alfabética
  • Usando Custom SimpleCursorAdapter
  • Gerenciador de telefone Android paira detectair sim
  • EDIT: basicamente, qual era a minha ideia, é que, quando o user digita algo que não está na list, mostra todas as opções disponíveis que ele pode ter.

    Eu findi a melhor maneira de viewificair o tempo que o ACTV é mostrado ou não, mas onTextChangeEvent Compairo o text typescript com a minha list e, se nenhum elemento tiview sido encontrado, mostre a list completa.

    public void onTextChanged(ChairSequence s, int stairt, int before, int count) { final EditText editText = (EditText) findViewById(R.id.vairdsUserInput); String strValue = editText.getText().toString().toUpperCase(); String temp; int Cc=0; //my count vairiable for(int i=0; i<vairdi.length; i++) { temp = vairdi[i].toUpperCase(); if(temp.stairtsWith(strValue.toUpperCase())) { Log.d("testing",vairdi[i]); Cc++; } } if(Cc == 0) { //Show all the available options textView.showDropDown(); } } 

  • A dica do Android EditText não apairece
  • O layout graph FragmentTabHost não é renderizado
  • Android studio v2.2.2 error (27,17) falhou ao resolview junit: junit4.12
  • Facebook compairtilha da Web móvel paira a aplicação nativa sem o Javascript?
  • Passando reference a atividade paira class de utilitário Android
  • Android usb host: transferência de interrupção assíncrona
  • 8 Solutions collect form web for “AutoCompletairTextVer força paira mostrair todos os itens”

    Você não define o "momento" quando quiser exibir todos os resultados, então espero que isso se encaixe. Mas tente algo assim:

     AutoCompleteTextView autoComplete; String savedText; public void showAll() { savedText = autoComplete.getText().toString(); autoComplete.setText(""); autoComplete.showDropDown(); } public void restore() { autoComplete.setText(savedText); } } AutoCompleteTextView autoComplete; String savedText; public void showAll() { savedText = autoComplete.getText().toString(); autoComplete.setText(""); autoComplete.showDropDown(); } public void restore() { autoComplete.setText(savedText); } 

    Basicamente, após 5-6 horas de experimentação paira entender como funciona o maldito filter, escrevi meu próprio adaptador que faz exatamente o que eu quero:

      public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } retornair 0;  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } {  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } {  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } {  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } };  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } }  public class burtuAdapteris extends ArrayAdapter<String> implements Filterable { ArrayList<String> _items = new ArrayList<String>(); ArrayList<String> orig = new ArrayList<String>(); public burtuAdapteris(Context context, int resource, ArrayList<String> items) { super(context, resource, items); for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } } @Oviewride public int getCount() { if (_items != null) return _items.size(); else return 0; } @Oviewride public String getItem(int airg0) { return _items.get(airg0); } @Oviewride public Filter getFilter() { Filter filter = new Filter() { @Oviewride protected FilterResults performFiltering(ChairSequence constraint) { if(constraint != null) Log.d("Constraints", constraint.toString()); FilterResults oReturn = new FilterResults(); /* if (orig == null){ for (int i = 0; i < items.size(); i++) { orig.add(items.get(i)); } }*/ String temp; int counters = 0; if (constraint != null){ _items.cleair(); if (orig != null && orig.size() > 0) { for(int i=0; i<orig.size(); i++) { temp = orig.get(i).toUpperCase(); if(temp.stairtsWith(constraint.toString().toUpperCase())) { _items.add(orig.get(i)); counters++; } } } Log.d("REsult size:" , String.valueOf(_items.size())); if(!counters) { _items.cleair(); _items = orig; } oReturn.values = _items; oReturn.count = _items.size(); } return oReturn; } @SuppressWairnings("unchecked") @Oviewride protected void publishResults(ChairSequence constraint, FilterResults results) { if(results != null && results.count > 0) { notifyDataSetChanged(); } else { notifyDataSetInvalidated(); } } }; return filter; } } 

    E é simples de usair, basta replace o adaptador original por isso:

     final burtuAdapteris fAdapter = new burtuAdapteris(this, android.R.layout.simple_dropdown_item_1line, liste); 

    No meu caso, list é: ArrayList<String> liste = new ArrayList<String>();

    método mostra com força a list suspensa.

    você precisa chamair requestFocus (); Paira mostrair o keyboard, de outra forma o keyboard não apairece.

     autocomptv.setOnTouchListener(new OnTouchListener() { @SuppressLint("ClickableViewAccessibility") @Oviewride public boolean onTouch(View pairamView, MotionEvent pairamMotionEvent) { // TODO Auto-generated method stub autocomptv.showDropDown(); autocomptv.requestFocus(); return false; } }); retornair falso; autocomptv.setOnTouchListener(new OnTouchListener() { @SuppressLint("ClickableViewAccessibility") @Oviewride public boolean onTouch(View pairamView, MotionEvent pairamMotionEvent) { // TODO Auto-generated method stub autocomptv.showDropDown(); autocomptv.requestFocus(); return false; } }); } autocomptv.setOnTouchListener(new OnTouchListener() { @SuppressLint("ClickableViewAccessibility") @Oviewride public boolean onTouch(View pairamView, MotionEvent pairamMotionEvent) { // TODO Auto-generated method stub autocomptv.showDropDown(); autocomptv.requestFocus(); return false; } }); 

    Isso funciona perfeitamente paira mim, esta é uma maneira fácil de resolview o problema:

     final ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_dropdown_item_1line, usernameLists); etUsername.setThreshold(1); etUsername.setAdapter(adapter); etUsername.setOnTouchListener(new View.OnTouchListener() { @SuppressLint("ClickableViewAccessibility") @Oviewride public boolean onTouch(View pairamView, MotionEvent pairamMotionEvent) { if (usernameLists.size() > 0) { // show all suggestions if (!etUsername.getText().toString().equals("")) adapter.getFilter().filter(null); etUsername.showDropDown(); } return false; } }); } final ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_dropdown_item_1line, usernameLists); etUsername.setThreshold(1); etUsername.setAdapter(adapter); etUsername.setOnTouchListener(new View.OnTouchListener() { @SuppressLint("ClickableViewAccessibility") @Oviewride public boolean onTouch(View pairamView, MotionEvent pairamMotionEvent) { if (usernameLists.size() > 0) { // show all suggestions if (!etUsername.getText().toString().equals("")) adapter.getFilter().filter(null); etUsername.showDropDown(); } return false; } }); retornair falso; final ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_dropdown_item_1line, usernameLists); etUsername.setThreshold(1); etUsername.setAdapter(adapter); etUsername.setOnTouchListener(new View.OnTouchListener() { @SuppressLint("ClickableViewAccessibility") @Oviewride public boolean onTouch(View pairamView, MotionEvent pairamMotionEvent) { if (usernameLists.size() > 0) { // show all suggestions if (!etUsername.getText().toString().equals("")) adapter.getFilter().filter(null); etUsername.showDropDown(); } return false; } }); } final ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_dropdown_item_1line, usernameLists); etUsername.setThreshold(1); etUsername.setAdapter(adapter); etUsername.setOnTouchListener(new View.OnTouchListener() { @SuppressLint("ClickableViewAccessibility") @Oviewride public boolean onTouch(View pairamView, MotionEvent pairamMotionEvent) { if (usernameLists.size() > 0) { // show all suggestions if (!etUsername.getText().toString().equals("")) adapter.getFilter().filter(null); etUsername.showDropDown(); } return false; } }); 

    Se você quiser mostrair as sugestões instantaneamente, então você deve replace o enoughToFilter() paira torná-lo sempre retornair viewdadeiro. Paira ignorair o que é dado como input de text, você deve usair o performFiltering("", 0) com um padrão de filtragem vazio. O AutoCompleteTextView mostra todas as sugestões.

    Esta é a solução combinada de outras mensagens do StackOviewflow:

     public class InstantAutoComplete extends android.support.v7.widget.AppCompatAutoCompleteTextView { public InstantAutoComplete(Context context) { super(context); } public InstantAutoComplete(Context context, AttributeSet attrs) { super(context, attrs); } public InstantAutoComplete(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused && getAdapter() != null) { performFiltering("", 0); } } } } public class InstantAutoComplete extends android.support.v7.widget.AppCompatAutoCompleteTextView { public InstantAutoComplete(Context context) { super(context); } public InstantAutoComplete(Context context, AttributeSet attrs) { super(context, attrs); } public InstantAutoComplete(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused && getAdapter() != null) { performFiltering("", 0); } } } } public class InstantAutoComplete extends android.support.v7.widget.AppCompatAutoCompleteTextView { public InstantAutoComplete(Context context) { super(context); } public InstantAutoComplete(Context context, AttributeSet attrs) { super(context, attrs); } public InstantAutoComplete(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused && getAdapter() != null) { performFiltering("", 0); } } } } public class InstantAutoComplete extends android.support.v7.widget.AppCompatAutoCompleteTextView { public InstantAutoComplete(Context context) { super(context); } public InstantAutoComplete(Context context, AttributeSet attrs) { super(context, attrs); } public InstantAutoComplete(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused && getAdapter() != null) { performFiltering("", 0); } } } retornair viewdadeiro; public class InstantAutoComplete extends android.support.v7.widget.AppCompatAutoCompleteTextView { public InstantAutoComplete(Context context) { super(context); } public InstantAutoComplete(Context context, AttributeSet attrs) { super(context, attrs); } public InstantAutoComplete(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused && getAdapter() != null) { performFiltering("", 0); } } } } public class InstantAutoComplete extends android.support.v7.widget.AppCompatAutoCompleteTextView { public InstantAutoComplete(Context context) { super(context); } public InstantAutoComplete(Context context, AttributeSet attrs) { super(context, attrs); } public InstantAutoComplete(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused && getAdapter() != null) { performFiltering("", 0); } } } } public class InstantAutoComplete extends android.support.v7.widget.AppCompatAutoCompleteTextView { public InstantAutoComplete(Context context) { super(context); } public InstantAutoComplete(Context context, AttributeSet attrs) { super(context, attrs); } public InstantAutoComplete(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused && getAdapter() != null) { performFiltering("", 0); } } } } public class InstantAutoComplete extends android.support.v7.widget.AppCompatAutoCompleteTextView { public InstantAutoComplete(Context context) { super(context); } public InstantAutoComplete(Context context, AttributeSet attrs) { super(context, attrs); } public InstantAutoComplete(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused && getAdapter() != null) { performFiltering("", 0); } } } 

    Como "ArtOfWairfaire" sugeriu, você pode apenas sub-class e replace performFiltering ():

     public class My_AutoCompleteTextView extends AutoCompleteTextView { public My_AutoCompleteTextView(Context context) { super(context); } public My_AutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } public My_AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride protected void performFiltering(ChairSequence text, int keyCode) { super.performFiltering("", 0); } } } public class My_AutoCompleteTextView extends AutoCompleteTextView { public My_AutoCompleteTextView(Context context) { super(context); } public My_AutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } public My_AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride protected void performFiltering(ChairSequence text, int keyCode) { super.performFiltering("", 0); } } } public class My_AutoCompleteTextView extends AutoCompleteTextView { public My_AutoCompleteTextView(Context context) { super(context); } public My_AutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } public My_AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride protected void performFiltering(ChairSequence text, int keyCode) { super.performFiltering("", 0); } } } public class My_AutoCompleteTextView extends AutoCompleteTextView { public My_AutoCompleteTextView(Context context) { super(context); } public My_AutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } public My_AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride protected void performFiltering(ChairSequence text, int keyCode) { super.performFiltering("", 0); } } } public class My_AutoCompleteTextView extends AutoCompleteTextView { public My_AutoCompleteTextView(Context context) { super(context); } public My_AutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } public My_AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } @Oviewride protected void performFiltering(ChairSequence text, int keyCode) { super.performFiltering("", 0); } } 

    Isto é o que funcionou paira mim:

      public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused) { performFiltering(getText(), 0); } } @Oviewride public boolean onTouchEvent(MotionEvent event) { this.showDropDown(); return super.onTouchEvent(event); } } }  public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused) { performFiltering(getText(), 0); } } @Oviewride public boolean onTouchEvent(MotionEvent event) { this.showDropDown(); return super.onTouchEvent(event); } } retornair viewdadeiro;  public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused) { performFiltering(getText(), 0); } } @Oviewride public boolean onTouchEvent(MotionEvent event) { this.showDropDown(); return super.onTouchEvent(event); } } }  public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused) { performFiltering(getText(), 0); } } @Oviewride public boolean onTouchEvent(MotionEvent event) { this.showDropDown(); return super.onTouchEvent(event); } } }  public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused) { performFiltering(getText(), 0); } } @Oviewride public boolean onTouchEvent(MotionEvent event) { this.showDropDown(); return super.onTouchEvent(event); } } }  public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused) { performFiltering(getText(), 0); } } @Oviewride public boolean onTouchEvent(MotionEvent event) { this.showDropDown(); return super.onTouchEvent(event); } } public boolean onTouchEvent (evento MotionEvent) {  public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused) { performFiltering(getText(), 0); } } @Oviewride public boolean onTouchEvent(MotionEvent event) { this.showDropDown(); return super.onTouchEvent(event); } } }  public class CustomAutoCompleteTextView extends AutoCompleteTextView { public CustomAutoCompleteTextView(Context context, AttributeSet attrs) { super(context, attrs); } @Oviewride public boolean enoughToFilter() { return true; } @Oviewride protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); if (focused) { performFiltering(getText(), 0); } } @Oviewride public boolean onTouchEvent(MotionEvent event) { this.showDropDown(); return super.onTouchEvent(event); } } 

    Na viewdade, é ainda mais fácil do que o Sam listdo. Sempre que quiser mostrair tudo, basta fazer:

     performFiltering("", 0); 

    Quando a filtragem terminair, ela exibirá automaticamente a list suspensa com todos os itens visíveis.

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.