-3

Demo1 Demo2

when users click the button to answer the questions for the TextView on the top, the TextView will change the questions depends on the user's answer. (I think this part won't be hard for me)

But what should I do after user click the button, the buttons will change as well, please see the demo picture.

are there any skills I should study first? like framelayout?

Thank you for your answers.

JacobH
  • 11
  • 1
  • 4

2 Answers2

2

It really depends on specific needs, but generally speaking, google guidelines are toward the use of fragments.

I'm developing Android apps since just few months and I'm using the single activity/multiple fragments approach. You have to learn how to use fragments, e.g. their lifecycle compared to the attached activity or how to handle events among fragments (EventBus can help you for such task).

You can find more discussions about this approach here

Cheers.

Community
  • 1
  • 1
Fabio
  • 782
  • 4
  • 8
  • 25
0

you can create a N fragement with your nuber Button and you set your buttons in this fragement (Demo 1) but in click a one button you can replace a Specific Fragment (Demo 2) in your framelayout be placed in your Activity