but the codeyour_extras.getExtras(myval) ;
didn't work ,i suppose there is no such method in Bundle class
i tried as show below
Bundle your_extras = this.getIntent().getExtras();
String val = (String) your_extras.get(myval);
but the val doesn't gives me the required data
Any
in your first Activity
Intent my_intent = new Intent(FirstScreen.this.getApplication(),
SecondScreen.class);
my_intent.putExtra(Value_String, HaiHow R U);
startActivity(intent);
in your Second Activity
in onCreate
Bundle extras = getIntent().getExtras();
String
in your first Activity
b.setOnClickListener(new Button.OnClickListener()
{
public void onClick(View v)
{
load_SecondActivity()
}
}
load_SecondActivity()
{
Intent
sorry, i have made a minor mistake ,the code given by me works
perfectly
and the val is displayed as excepted .
On Feb 24, 1:42 pm, gganesh ganesh@gmail.com wrote:
but the code your_extras.getExtras(myval) ;
didn't work ,i suppose there is no such method in Bundle class
i tried as
you have to
use
Bundle your_extras = getIntent.getExtras();
String val = your_extras.getExtras(myval);
On Tue, Feb 24, 2009 at 11:08 AM, gganesh ganesh@gmail.com wrote:
hi friends,
i have two classes Screen1 and Screen2 both extends activity
i have to pass data from the Screen1 to
5 matches
Mail list logo