refactor HomeActivity code about fragment display.