Android AutoCompleteTextView - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android AutoCompleteTextView class.

This code example shows how to use the following methods: getText
                          items));
  } 
   
  public void onTextChanged(CharSequence s, int start, int before,
                              int count) {
    selection.setText(edit.getText());
  } 
   
  public void beforeTextChanged(CharSequence s, int start,
                                  int count, int after) {
    // needed for interface, but not used 
  } 
   
  public void afterTextChanged(Editable s) {
    // needed for interface, but not used 
  } 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getText
  } 
   
  @Override 
  public void onTextChanged(CharSequence s, int start, int before,
                              int count) {
    selection.setText(edit.getText());
  } 
   
  @Override 
  public void beforeTextChanged(CharSequence s, int start,
                                  int count, int after) {
    // needed for interface, but not used 
  } 
   
  @Override 
  public void afterTextChanged(Editable s) {
    // needed for interface, but not used 
  } 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setOnKeyListener, setAdapter, setOnItemClickListener, setThreshold, addTextChangedListener
	public StationSelectorAdapter( Context context, AutoCompleteTextView view, StationSearchService service, List<Station> history, ChangeListener listener ) {
		this.context = context;
		this.listener = listener;
		this.history = history;
 
		view.setAdapter( new StationsAdapter( context, service, history ) );
		view.setMaxLines( 1 );
		view.setThreshold( 1 );
		view.addTextChangedListener( this );
		view.setOnItemClickListener( this );
		view.setOnKeyListener( this );
	} 
 
	@Override 
	public void afterTextChanged( Editable paramEditable ) {
		station = null;
		listener.stationChanged();
	} 
 
	@Override 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setAdapter, setOnItemClickListener
 
    @Override 
    public void onResume() { 
        super.onResume(); 
        if (App.getUser().isSearchSuggestionsEnabled()) { 
            searchField.setAdapter(suggestionHelper.getAdapter());
            searchField.setOnItemClickListener(this);
        } else { 
            searchField.setAdapter(suggestionHelper.getEmptyAdapter());
        } 
    } 
 
    @Override 
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
        if (v.getId() == R.id.query_input && actionId == EditorInfo.IME_NULL) {
            startSearch(); 
        } 
        return false; 
    } 
 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: requestFocus, setVisibility, setAdapter, setThreshold, setText
	} 
	 
	public void pulsaBuscar(View view){
		botonBuscar.setVisibility(View.INVISIBLE);
		titleConsulta.setVisibility(View.GONE);		
		textoBuscar.setVisibility(View.VISIBLE);
		textoBuscar.setText("");
		textoBuscar.requestFocus();
 
		// AutoComplete 
		S.data_base.openR(); 
		String[] aditivos = S.data_base.consultaNombreNummeroAditivos();
		S.data_base.close(); 
		if(aditivos == null)
			aditivos = new String[0];
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, aditivos);
		textoBuscar.setAdapter(adapter);
		textoBuscar.setThreshold(2);
	} 
	 

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android AutoCompleteTextView Questions & Answers:

Other Android AutoCompleteTextView Examples

1:	// Get a reference to the AutoCompleteTextView in the layout
2:	AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete_country);
3:	// Get the string array
4:	String[] countries = getResources().getStringArray(R.array.countries_array);
-
1:	// Get a reference to the AutoCompleteTextView in the layout
2:	AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete_country);
3:	// Get the string array
4:	String[] countries = getResources().getStringArray(R.array.countries_array);

Read More

See Code Examples for Android AutoCompleteTextView Methods: