I am trying to navigate between fragments like below:
Fragment A --> Fragment B --> Fragment C --> Fragment D
and the user can again navigate from Fragment D --> Fragment A
like below:
Fragment D --> Fragment A --> Fragment B --> Fragment C --> Fragment D
in this case a loop is created on the back press key.How to manage this type of situation to avoid the loop of fragment on backpress.
Navigation loop not a bad thing. Do not try to avoid it.
There is navigation pattern that could help you with this problem http://developer.android.com/design/patterns/navigation.html