0

This is a simple and fundamental question about android development. So I have these text fields in my program, and I want to send the text to the java side, check it and what not, then send it back to XML on another layout. So I really need to know how to take a java variable and store it in the XML values folder (the thing I would use @string/abc to refer to) Thanks! If you need clarification please ask, I know I'm not too great at wording these questions. :)

guruguru32
  • 41
  • 1
  • 1
  • 5

1 Answers1

0

From what I could decipher from your question, you are looking to pass data between two different activities. You can use Intents for that in android. Here is a SO resource.

If you are looking to save values, you can also look at Shared Preferences in android. Look at the official documentation here and here You can write to a shared preference in one activity and read from it in another. Generally I design one singleton class which does shared preference handling and interact with that class from different activities.

And its better to show some code, any attempts. This community understands code better than text! :)

Community
  • 1
  • 1
Codester
  • 193
  • 6