Sorry, my English is not good. How can I show fragments side by side so that when the user clicks a button in fragment A, fragment B is shown (80%)?
Asked
Active
Viewed 651 times
0
-
here is a example of sliding menu, you can implement fragments by yourself http://stackoverflow.com/a/15879886/1939564 – Muhammad Babar Sep 27 '13 at 10:54
3 Answers
2
Go through the below links. It may help you
https://github.com/gitgrimbo/android-sliding-menu-demo
https://github.com/jfeinstein10/SlidingMenu

Rajiv Ratan
- 129
- 4
1
If you are looking to put a side menu in there that can be moved in and out you could try the Navigation Drawer by Google and it should do the job. Read about it here: Creating a Navigation Drawer

Robert Wildman
- 59
- 3
-
-
@AfonsoMatlhombeJunior Yes I do and it works very well for what I need it to do, So a simple menu bar down the side of the screen that can be moved in and out when the user wants to. – Robert Wildman Sep 27 '13 at 12:26
-
Sorry i forgot to increase you answer level, it was very useful i got it(sorry for my English) – Afonso Matlhombe Junior Oct 03 '13 at 19:49
0
I assume that you want to display a fragment on a button click. You can simply use replace function to replace the fragment on button click like this:
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace("layoutName",fragmentB)

root
- 23
- 1
- 6
-
With your code it will replace all 100% fragmentA, i want fragmentA(20%) and fragmentB(80%). – Afonso Matlhombe Junior Sep 27 '13 at 10:52