Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class UserFragment extends Fragment {
- private OnButtonNavOpenedInterface listener;
- public void setListener(OnButtonNavOpenedInterface listener) {
- this.listener = listener;
- }
- public interface OnButtonNavOpenedInterface {
- void onOpen();
- void onClose();
- }
- @Nullable
- @Override
- public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- return inflater.inflate(R.layout.fragment_user, container, false);
- }
- @Override
- public void onResume() {
- super.onResume();
- listener.onClose();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment