This is a simple code to play a sound on click off a button, this code was initially written in Activity but now i want to change it to Fragments.
button
erro
Use this code in overriden method OnActivityCreated(...) and instead of this use getActivity(), since new fragment is not activity any more.
OnActivityCreated(...)
this
getActivity()