java - Implement a button on both sides. Click the button to switch the content in the middle. The middle can be a fragment. How to achieve this effect?
習慣沉默2017-05-16 13:33:43
0
2
831
Implement a button on both sides. Click the button to switch the content in the middle. The middle can be a fragment. How to achieve this effect? I have tried viewpager, but it is not easy to use in the project , please find other solutions.
Why don’t you use a list to save your fragment? Click the left and right buttons to perform the corresponding list.get(position) addition and subtraction operations, and then replace the fragment. Is this enough to meet your needs?
Why don’t you use a list to save your fragment? Click the left and right buttons to perform the corresponding list.get(position) addition and subtraction operations, and then replace the fragment. Is this enough to meet your needs?
This is very simple.
To display a fragment, click the button to show it directly, or replace the current fragment
Button can use RadioGroup to nest RadioButton