1

I have 5 fragments in my app. I use backstack. When I open fragment, he added to backstack.

[Fragment1]->[Fragment2]->[Fragment3]->[Fragment4]->[Fragment5]

And when I click back-button I need to open 2 latest fragmets cyclically.

[Fragment4]->[Fragment5]->[Fragment4]->[Fragment5]->[Fragment4]->[Fragment5]

Is it possible?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Vladimir
  • 25
  • 7
  • I am not sure of what you are asking here. But it looks like you just need a custom implementation of onBackPressed method of your root activity. Just check, what fragment is on the top of stack, and implement to load the fragment off the stack logically. – Sushant kunal Apr 24 '15 at 07:06

1 Answers1

0

This issue resolved. I use backstack without repeating fragment. It's better!

Vladimir
  • 25
  • 7