3

I am using viewpager with tabs. I have 2 tabs and each tabs has a listview. I am using fragmentstatepageradapter like that:

public Fragment getItem(int position) {
    switch (position) {
        case 0:
           return new fragmenttab1();
        case 1:
            return new fragmenttab2();
  }
    return null;

I want to replace fragments on current position when click on any Item in listview.. How can I do it?

Qiu
  • 5,651
  • 10
  • 49
  • 56

0 Answers0