The sorting in the app with fragments
You should use newInstance() pattern, described in this link

The profit of using this pattern is, developer cannot instantiate Fragment without providing arguments. There will be no chances that you will get default value when you try to get that value. One more thing is, whatever key is required for a fragment should be defined in public static final String so that no chances for string mismatch in key.