Code example for Fragment

Methods: getActivity, getResources