tags:

views:

34

answers:

2

Hello, i am trying to get the text input/values from an EditText widget as its being typed. please anybody know how or which method i should use? can't seem to find one that will help. thanks for your consideration.

i tried this but not working:

  Entry = (EditText)findViewById(R.id.typeEntryId);
          viewEntry = (TextView)findViewById(R.id.viewEntryId);

       if(Entry != null){
            //viewEntry.setText(Entry.getEditableText().toString());
                  viewEntry.setText(Entry.getText().toString());
        }
A: 
EditText field = (EditText) findViewById(R.id.myField);
if ( field != null ) {
  Log.d ("myField",field.getText().toString());
}

you should be able to just do that. The getText() method returns an Editable type which implements CharSequence

Ryan Conrad
yeah, i tried that buts its not working, if i am trying to display it in another text view. i even tried getEditableText(). i have edited my question to show the code i tried.
manuelJ
+2  A: 

Use a TextWatcher.

Mayra
works, thank you
manuelJ