Fragment has default white background on replace() instead of transparent one
you can use the following property for all your root layouts, views, fragments, containers etc:
android:background="@android:color/transparent"
If you want to display the background of your activity only then all the views should be transparent.
For this you have to set android:background="@android:color/transparent"
for each view other than the MainActivity
's backgroud. i.e background for
- the
Fragment
s - their child
View
s - the
ListView
(s) - and
ListView
's items / childs etc.
In short each view must have a transparent background so that the Activities' background is not overlapped and visible to the user.