package lu.circl.mispbump.activities; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; import lu.circl.mispbump.R; import lu.circl.mispbump.fragments.PreferencesFragment; public class PreferenceActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_preference); initializeViews(); } private void initializeViews() { Toolbar myToolbar = findViewById(R.id.toolbar); setSupportActionBar(myToolbar); FragmentManager fragmentManager = getSupportFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); fragmentTransaction.add(R.id.fragmentContainer, new PreferencesFragment(), PreferencesFragment.class.getSimpleName()); fragmentTransaction.commit(); } }