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