hello, what should be added to the onBackPressed() method in MainActivity so that it would be impossible to go back from the fragment when clicking on BackButton ?
in MainActivity
@Override public void onBackPressed() { super.onBackPressed(); } transition to fragment
protected Fragment fragment = null; /** * Call to LoadingGame fragment */ public void LoadingGamePath() { fragment = new LoadingFragment(); getSupportFragmentManager().beginTransaction().replace(R.id.container_body, fragment).commit(); }