sagar pawar
sagar pawar

Reputation: 55

How to use setArgument in FragmentActivity

I am able to use setArgument() for passing data in to Fragment But unable to do same thing in FragmentActivity

Upvotes: 0

Views: 89

Answers (1)

Egor
Egor

Reputation: 40218

Use Intents to pass data to a FragmentActivity:

Intent intent = new Intent(context, MyFragmentActivity.class);
intent.putExtra("some_key", "some_data");
context.startActivity(intent);

Upvotes: 1

Related Questions