• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Nested fragments in android app

techi18

Lurker
Hi,

I have an app that has a Stepper to move between one fragment to another using forward and backward buttons.

My problem is I want to create menu buttons in the first fragment, which allow me to move to any selected fragments. I tried to use FragmentManager and FragmntTransction, but they didn't work with me If I have fragment inside fragment.

Anyone with experience, I will appreciate your help!.

Thank you
 
Difficult to say, without knowing exactly what you are trying to achieve visually, and whether Fragments are the correct way of doing it.
UI designs usually start with a particular layout in mind, and it's therefore the LayoutManager which dictates the architecture. Fragments are only part of the solution.
 
Difficult to say, without knowing exactly what you are trying to achieve visually, and whether Fragments are the correct way of doing it.
UI designs usually start with a particular layout in mind, and it's, therefore, the LayoutManager which dictates the architecture. Fragments are only part of the solution.

I am using material-design-stepper, so I have the main activity which has tabs to different steppers, Instead, to start steppers directly, I want to create a main menu screen for each stepper tab, so I can choose the screen by pressing a button in the menu. I hope you got my point?

Thanks
dotted-progress-bar-styled.gif
 
Ok thanks. Think I'll have a go at that one. Can you share the code you have and I can work with it?
Put it on Github if you can.
 
I am using material-design-stepper, so I have the main activity which has tabs to different steppers, Instead, to start steppers directly, I want to create a main menu screen for each stepper tab, so I can choose the screen by pressing a button in the menu. I hope you got my point?

Thanks
dotted-progress-bar-styled.gif


When you say "choose the screen" what do you mean? Steppers are inherently sequential in nature. Which means you do one thing followed by another in strict order, not an arbitrary choice.

There are various flavours of Stepper described in the following link, with associated code. Which one would you say describes what you're trying to do best?

https://material-ui.com/demos/steppers/
 
Ok thanks. Think I'll have a go at that one. Can you share the code you have and I can work with it?
Put it on Github if you can.
Thanks, LV426!. I don't want you to work on it, I just want some advice from your experience, I prefer to work on it by my self, I am here to learn :).
 
I like your attitude. However your problem is unclear, so it's difficult to give advice. Maybe you could include a code fragment or two to illustrate the problem.
 
Back
Top Bottom