This is how I navigate to each fragment.
Fragment f = new ChartFragment();
f.setArguments(fragbundle);
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.containerView, f);
ft.addToBackStack(null);
ft.commit();
Now my problem is that when I unlock my screen, it shows the first fragment. How can I start from the fragment which I was last in.