@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRetainInstance(true); int position = getArguments().getInt(categoryPositionKey); notificationCategory = NotificationCategory.values()[position]; adapter = new NotificationAdapter(getContext(), notificationListPresenter, notificationCategory); }