I want to use a fragment in multiple activities. In the first activity i will use it in, I created it by
final ScoreBoard fragment = new ScoreBoard();
getFragmentManager()
.beginTransaction()
.add(R.id.fragment_container, fragment)
.commit();
In the second activity, I have placed the same code in the onCreate() method. However, the fragment keeps resetting and doesn't keep its values in the second activity even though I had saved them through onSavedInstanceState() and onActivityCreated(). Am I recreating the fragment and resetting it? Thank you.