I am trying to pass a simple string in to a new activity. I feel a
little dense. I have looked at the samples, and I just can't seem to
get it through my thick head. What do I need in the first parameter.
public static final String DRINK_TYPE = "type";
.
.
.
Intent i = new Intent(this, BeerScreen.class);
i.putExtra(DRINK_TYPE, "beer");
Then in BeerScreen.java
String sType = extras.getString("type");
if(sType == "beer"){
The code inside the if is not executed. <sigh>
Kevin
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---