Code example for AutoCompleteTextView

Methods: setAdapter

0
      if (!labels.contains(label))
        labels.add(label);
     
      ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
        android.R.layout.simple_dropdown_item_1line, labels);
      mLabelText.setAdapter(adapter);
    } 
     
    /** 
     * Create a dialog to display the password to the user. 
     */ 
    private void displayPassword(){ 
    	new AlertDialog.Builder(Oplop.this)
    	  .setMessage(mPasswordText)
    	  .setIcon(R.drawable.oplop)
    	  .setTitle(R.string.text_generate) 
    	  .setPositiveButton(R.string.button_ok,  
    			    new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, 
                    		              int whichButton) {
                      }