https://kotlinlang.org logo
a

andyg

11/12/2017, 10:18 PM
perhaps the entire
when
should have been the function result, like
Copy code
{
  when(position) {
    0 -> FragmentA()
    1 -> FragmentB()
  }
}