sendText();
super.onCreate(savedInstanceState); setContentView(R.layout.list_12); mAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mStrings); setListAdapter(mAdapter); mUserText = (EditText) findViewById(R.id.userText); mUserText.setOnClickListener(this); mUserText.setOnKeyListener(this);
if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (keyCode) { case KeyEvent.KEYCODE_DPAD_CENTER: case KeyEvent.KEYCODE_ENTER: sendText(); return true; } } return false;
String text = mUserText.getText().toString(); mAdapter.add(text); mUserText.setText(null);