@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getLayoutInflater().inflate(R.layout.firstscreen_layout, null); // getLayoutInflater().inflate(R.layout.firstscreen_layout, null); homeConnect = new HomeConnect(); FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.replace(R.id.container, homeConnect, "LogIn"); ft.commit(); setContentView(R.layout.firstscreen_layout); }