This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

2 activities, get value

 
Mathew Mintalm
Ranch Hand
Posts: 103
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, Im making my application, and i have problem, hope some one is gonna help me.

Let me describe problem:

I have 2 activities:

- first for main menu, containing one TextView and one Button
- second containing only one TextView

And whats my problem? In my second activity i can not receive value from textview from first activity (always error, stopped unexpected ...)



Never works, i have been trying with singleton holder and getInstance() aswell, but always the same.

Thanks in advance for any help.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're sending something simple, like Strings or numbers, you can pass these as "extras" to the new Activity when you launch it.

 
Mathew Mintalm
Ranch Hand
Posts: 103
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works, thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic