I am building an application with one Activity MainActivity
which consists of two fragments. And I came across with many tutorials that use FrameLayout
as the parent container for the fragment layout.
However, I came to know that I can still use LinearLayout
as parent container of the fragment and it works perfectly fine (so far).
My question, is there any side effect(s) of not using FrameLayout
as the parent container for the fragment layout?
If there isn't, then what is the advantage of using FrameLayout
over LinearLayout
(or other possible layout) as the parent container of the fragment layout.