@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_item_detail, container, false);

        ((TextView) rootView.findViewById(R.id.item_detail)).setText(getResources().getStringArray(R.array.countries)[mItem]);
        return rootView;
    }
Mandatory empty constructor for the fragment manager to instantiate the
fragment (e.g. upon screen orientation changes).
Example/src/com/tonicartos/stickygridheadersexample/ItemDetailFragment.java