Refactor with fragments: MainActivity (opt out root FrameLayout, format xml source).