Hi, I have my application set to grab the text from an EditText field,
but for some reason even if I convert it "toString", the returned
string always comes back blank. Here is my code:
Button button;
EditText text;
button = (Button) findViewById(R.id.btnOK);
text = (EditText) findViewById(R.id.txtCustomerName);
final String message = text.getText().toString();
button.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
Toast.makeText(HelloWorld.this, message,
Toast.LENGTH_SHORT).show();
}
});
Sorry for the bad code organization, but copy and paste didn't really
work out the way I imagined, Haha. Any help would be great. Also, I
tried searching, but for some reason I just can't find a solution.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---