S
Size: a a a
S
S
S
P

AU
Д
S
S
AU
internal class MyFragment {
…
companion object {
private const val ARG_TEMPERATURE = «TEMPERATURE»
private const val ARG_WIND = «WIND»
private const val ARG_PRECIPITATION = «PRECIPITATION»
fun newInstance(temperature: Parcelable, wind: Parcelable, precipitation: Parcelable): MyFragment =
MyFragment().apply {
args = Bundle().apply {
putParcelable(ARG_TEMPERATURE, temperature)
putParcelable(ARG_WIND, wind)
putParcelable(ARG_PRECIPITATION, precipitation)
}
}
}
}
from another class:
…
val fragment = MyFragment.newInstance(params)
supportFragmentManager.commit {
// commit you fragment here (replace or add, add to backstack) …
}
…6
6
P
AS
СП
СП
P
R
Du