G
G
goodTimes2017-03-09 15:57:07
Java
goodTimes, 2017-03-09 15:57:07

How to pass multiple parameters to a fragment?

1 I know how, but if there are several?

Bundle bundle = new Bundle();
bundle.putInt("position", position);                 
fdiscription.setArguments(bundle);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Myvrenik, 2017-03-09
@goodtimes922

Exactly the same as the first one.

bundle.putInt("position", position);
bundle.putInt("foo", 5);
bundle.putInt("bar", 10);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question