Code example for AutoCompleteTextView

0
    mLL.addView(mButton_dial);
    mScrollView = new ScrollView(this);
    mTextView = new TextView(this);
    mScrollView.addView(mTextView);
    mLL.addView(mScrollView);
    mDDList = new AutoCompleteTextView(this);
    mButton_dial.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
        parseEntry(); 
      } 
    }); 
 
    setContentView(mLL);
  } 
 
  public boolean onKeyDown(int keyCode, KeyEvent event) {
    if (keyCode == KeyEvent.KEYCODE_ENTER) {
      parseEntry(); 
      return true; 
    } 
    return false;