When I read tutorials about supporting different screen sizes for Android, they often use FrameLayout as the placeholder for the fragment in FragmentTransaction uses. Like this:
getSupportFragmentMananager().beginTransaction()
.replace(R.id.frame_layout, fragment)
So why should we use FrameLayout ? Are there any advantages or disadvantages when using FrameLayout as the fragment container ? (I have tried RelativeLayout as the fragment container instead and it's still working well). I am a newbie so I hope will get a clear and thorough answer.
Edit: I have read the answers in the question link that you provided (the possible duplicate). However, it lacks clear example. I really want a simple example that demonstrate why I should use FrameLayout instead of other layout types.