Hey all.
I've set up a horizontal scrolling system to move between 5 different Fragments, at the moment pressing the back button on the phone/tablet will exit the app. This happens on all Fragments.
Can anyone help in getting the back button to move to the first fragment. So Fragment 2, 3 , 4 and 5 will all move to Fragment 1 when the back button is pressed.
I've been looking into Fragment transactions but I can't get them to work, I guess I just don't understand it that well yet. Maybe it's not the correct way.
I have the horizontal scrolling thing set up in the usual way. Each Fragment has it's own Java file, there's a Fragment pager adapter. based within a FragmentActivity.
So can anyone give me some advice on where to go with this?
Appreciate any help!
I've set up a horizontal scrolling system to move between 5 different Fragments, at the moment pressing the back button on the phone/tablet will exit the app. This happens on all Fragments.
Can anyone help in getting the back button to move to the first fragment. So Fragment 2, 3 , 4 and 5 will all move to Fragment 1 when the back button is pressed.
I've been looking into Fragment transactions but I can't get them to work, I guess I just don't understand it that well yet. Maybe it's not the correct way.
I have the horizontal scrolling thing set up in the usual way. Each Fragment has it's own Java file, there's a Fragment pager adapter. based within a FragmentActivity.
So can anyone give me some advice on where to go with this?
Appreciate any help!