1

Is it possible to create and build an app just using Fragment? Even the Sign in and Register?

What is FragmentStatePagerAdapter? Is this required or very helpful when building a app only using Fragments? Thank you for the information. It means a lot to me.

Vladimir Vagaytsev
  • 2,871
  • 9
  • 33
  • 36
Liza Catherine Ombyaw
  • 804
  • 2
  • 11
  • 27
  • 1
    *Is it possible to create and build an app just using Fragment?* YES **[What is FragmentStatePagerAdapter?](https://developer.android.com/reference/android/support/v4/app/FragmentStatePagerAdapter)** https://stackoverflow.com/questions/18747975/difference-between-fragmentpageradapter-and-fragmentstatepageradapter – AskNilesh Sep 04 '18 at 10:40
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the [How to Ask](https://stackoverflow.com/help/how-to-ask) page for help clarifying this question. – V-rund Puro-hit Sep 04 '18 at 10:41
  • Yes You can using the latest MVP or MVVM architecture – Akshay Sep 04 '18 at 11:11
  • Ambiguous tag has been removed. `fragment` tag is not recommended for use – Vladimir Vagaytsev Sep 04 '18 at 11:49
  • You can build an app with Fragments, but a Fragment is not a view, so they must be contained in some ViewGroup like a FrameLayout for example to be used in one or more activities. – Juan Sep 04 '18 at 12:00

1 Answers1

0

Ofcourse yes!!, you can develop an application only using fragments,

FragmentStatePagerAdapter only stores the savedInstanceState of fragments, and destroys all the fragments when they lose focus.

but it is not possible by using FragmentStatePagerAdapter because it destroys the fragments whenever they are not visible to the user, for that purpose you require something which stores fragments inside the memory and reusable which can be done by using FragmentPagerAdapter

this is yash
  • 533
  • 1
  • 3
  • 15