Friday, February 7, 2014

Ask a question: how to use Intent parameters passed to the constructor is called the Activity


            
For example
 public class BActivity extends Activity 
{
BActivity (Context context)
{
.....
}
}



When I call with Intent
 Intent iIntent = new Intent (RdmRingActivity.this, FileExplorerViewActivity.class); 
startActivity (iIntent);

To how the parameters required for the constructor BActivity pass go?
Trouble you
Reply:
This can only be received in onCreate inside the constructor is not receiving the Activity.
Reply:
cited a floor ultrapro reply:
this can only be received in onCreate inside constructor Activity is not receiving the

Specifically how to do it?
Reply:
How no one, Manga
Reply:
Intent intent = new Intent ();
intent.putExtra (KEY, value);
This method is the key of the situation. Here put, get in there you want to use it.
Reply:
references, 4th Floor smile_dandan reply:
Intent intent = new Intent ();
intent.putExtra (KEY, value);
This method is the key of the situation. Here put, get in there you want to use it.

I want to pass the Context, however resolved, did not use this thing
Reply:
You want to pass context is how to solve the problem of this type of argument?

No comments:

Post a Comment