Added method setRetainInstance for saving fragments if activity is recreated