Code example for EditText

Methods: getText, getEditableText

0
 
    private final class OnSendButtonClickListener implements OnClickListener {
 
        @Override 
        public void onClick(View v) {
            String text = messageEditText.getText().toString();
            adapter.add(new Message(new Date(), text));
            messageEditText.getEditableText().clear();
        } 
    } 
     
    private final class OnClearHistoryButtonClickListener implements OnClickListener {
 
        @Override 
        public void onClick(View v) {
            adapter.clear();
        } 
    } 
 
    private class LogAdapter extends MutableListAdapter<Message> {