• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Text box question

In your onCreate() method, capture the EditText object, like so:
Code:
final EditText edit = (EditText)findViewById(R.id.edit_text_name_in_XML_file);
Then, you can use the methods of the EditText object to get/set its contents, like so:
Code:
edit.setText("Hello!");
String sayWhat = edit.getText();
It's that easy!

--Boogs
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones