Neyasbit

UserFragment

Apr 5th, 2019
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. public class UserFragment extends Fragment {
  2.     private OnButtonNavOpenedInterface listener;
  3.  
  4.     public void setListener(OnButtonNavOpenedInterface listener) {
  5.         this.listener = listener;
  6.     }
  7.  
  8.     public interface OnButtonNavOpenedInterface {
  9.         void onOpen();
  10.         void onClose();
  11.     }
  12.     @Nullable
  13.     @Override
  14.     public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
  15.         return inflater.inflate(R.layout.fragment_user, container, false);
  16.  
  17.     }
  18.  
  19.     @Override
  20.     public void onResume() {
  21.         super.onResume();
  22.         listener.onClose();
  23.  
  24.     }
  25.  
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment