Last Updated: Jun 30,2010
I wanna get the text from edittext as string,,,how to get that..
final EditText text = (EditText)findViewById(R.id.text);
System.out.println( "The String: " + text.getText().toString() );
i always get a message saying "id cannot be resolved"
my code is as follows:
txtbox1= (EditText) findViewById(R.id.txtbox1);
button1 = (Button) findViewById(R.id.button1);
tv = (TextView) findViewById(R.id.tv);
txtbox2= (EditText) findViewById(R.id.txtbox2);
Post your xml -- you're probably not creating the views correctly. You need to have something like:
(note the + before the id)
If you do have this, make sure your xml is saved and doesn't have any other errors in it.
Separate names with a comma.