Skip to content Skip to sidebar Skip to footer

Open A Specific Fragment Of Activity A From Activity B

Here again! The situation is this, I have: Activity A that implements a viewPager and visualizes 3 possible fragments. To access to each fragment I use this code: @Override

Solution 1:

Finally I've found the solution by my own :)

I used intent.putExtra() to pass the position of the fragment which I wanted to display, then in the called activity I used the method setCurrentItem(position) of ViewPager and the wanted fragment is displayed.

Hope this can help someone else who will have my same problem!

Post a Comment for "Open A Specific Fragment Of Activity A From Activity B"