I am creating an application with one Activity MainActivity , which consists of two fragments. And I came across many tutorials that use FrameLayout as the parent container for the fragment layout.
However, I found out that I can still use LinearLayout as the parent container of this fragment, and it works fine (for now).
My question is: is there any side effect of using FrameLayout as the parent container for the fragment layout?
If not, what is the advantage of using FrameLayout over LinearLayout (or another possible layout) as the parent container of the fragment layout.
android android-layout android-linearlayout android-framelayout
fruqi
source share