Sometimes we need to know when fragment is selected and to handle it.
1. Add interface:
public interface FragmentSelection{ void onPageUnSelected(); void onPageSelected(); }
Android Development
Context
this fragment is currently associated with.onCreateView(LayoutInflater, ViewGroup, Bundle)
), if provided.