I'm new in android development. I have some fragments which are displayed in Tab Layout. i don't want to let users swipe between Tabs. i want users stay in first Tab. then i set a button at the bottom of the first tab and when users click on the button, then they go to second tab(next fragment).like image attached below. how i can do this?
Thank you....
Asked
Active
Viewed 40 times
0
adneal
- 30,201
- 10
- 118
- 149
ehsan ashtiani
- 19
- 3
1 Answers
3
Step #1: Do not use TabLayout.
Step #2: Do not use ViewPager.
Step #3: When the user clicks the button, do something to replace the contents of your initial UI with the next UI, such as executing a FragmentTransaction.
CommonsWare
- 954,112
- 185
- 2,315
- 2,367
-
thank you. but i want show tab icons top of page. and use tablayout swiping animation... – ehsan ashtiani Sep 13 '17 at 16:05
-
1@ehsanashtiani: "but i want show tab icons top of page" -- your users will expect to be able to navigate using those tabs. Do not show tabs unless the tabs are fully functional. – CommonsWare Sep 13 '17 at 16:07
-
have you used "Sololearn" Application? i want implement my app like that. showing tabs top of page, send this message to user that there are more tabs too... – ehsan ashtiani Sep 13 '17 at 16:27