@Override protected void onSaveInstanceState(Bundle outState) { try { View container = findViewById(R.id.container_player); if (container != null) { outState.putInt("playerVisibility", container.getVisibility()); if (playerFragment != null) { getSupportFragmentManager().putFragment(outState, "player", playerFragment); } } } catch (Exception ex) { logger.error(ex); } super.onSaveInstanceState(outState); }
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); restore(savedInstanceState); }