File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes 2 activities, get value Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "2 activities, get value" Watch "2 activities, get value" New topic
Author

2 activities, get value

Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 102

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

Joined: Oct 18, 2000
Posts: 4120

If you're sending something simple, like Strings or numbers, you can pass these as "extras" to the new Activity when you launch it.



-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Mathew Mintalm
Ranch Hand

Joined: Feb 21, 2010
Posts: 102

Works, thank you
 
IntelliJ Java IDE
 
subject: 2 activities, get value
 
Threads others viewed
Layout issue-footer image to the bottom of screen (Landscape & portrai) irrespective of body content
How to pass POJOs / data / values between activities?
Just finished my first java program :-) Can you please give me suggestions on making my code better?
webview help......
Problem with Customised ListView
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture