Search in sources :

Example 1 with DrawerLocker

use of com.example.first_responder_app.interfaces.DrawerLocker in project FirstResponse by mattpost1700.

the class HomeFragment method onCreateView.

@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    DrawerLocker drawerLocker = ((DrawerLocker) getActivity());
    if (drawerLocker != null) {
        drawerLocker.setDrawerLocked(false);
    }
    FragmentHomeBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_home, container, false);
    NavHostFragment navHostFragment = (NavHostFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
    bindingView = binding.getRoot();
    // TODO: navCont created for side bar(still need to be implemented)
    NavController navController = navHostFragment.getNavController();
    // switch to Home fragment upon clicking it
    // also if you have any other code relates to onCreateView just add it from here
    activeUser = AppUtil.getActiveUser(getActivity());
    if (activeUser == null) {
        getActivity().getFragmentManager().popBackStack();
        Toast.makeText(getContext(), "User is not logged in!", Toast.LENGTH_SHORT).show();
    }
    // Setup click listeners for the view all incidents and view all responders buttons
    binding.viewAllIncidents.setOnClickListener(view -> {
        NavDirections action = HomeFragmentDirections.actionHomeFragmentToIncidentGroupFragment();
        Navigation.findNavController(binding.getRoot()).navigate(action);
    });
    binding.viewAllResponders.setOnClickListener(view -> {
        NavDirections action = HomeFragmentDirections.actionHomeFragmentToRespondingFragment();
        Navigation.findNavController(binding.getRoot()).navigate(action);
    });
    binding.sortIncidentsButton.setOnClickListener(view -> {
        PopupMenu popupMenu = new PopupMenu(getContext(), view);
        popupMenu.setOnMenuItemClickListener(this);
        popupMenu.inflate(R.menu.incident_popup_menu);
        popupMenu.show();
    });
    binding.sortRespondersButton.setOnClickListener(view -> {
        PopupMenu popupMenu = new PopupMenu(getContext(), view);
        popupMenu.setOnMenuItemClickListener(this);
        popupMenu.inflate(R.menu.user_popup_menu);
        popupMenu.show();
    });
    final SwipeRefreshLayout pullToRefresh = bindingView.findViewById(R.id.homeSwipeRefreshLayout);
    pullToRefresh.setOnRefreshListener(() -> {
        // your code
        refreshData();
        pullToRefresh.setRefreshing(false);
    });
    listOfIncidentDataModel = new ArrayList<>();
    respondersList = new ArrayList<>();
    listOfRanks = new ArrayList<>();
    // automatically subscribes everyone who logs in to get notifications for these topics
    FirebaseMessaging.getInstance().subscribeToTopic("events").addOnCompleteListener(new OnCompleteListener<>() {

        @Override
        public void onComplete(@NonNull Task<Void> task) {
        }
    });
    FirebaseMessaging.getInstance().subscribeToTopic("announcements").addOnCompleteListener(new OnCompleteListener<Void>() {

        @Override
        public void onComplete(@NonNull Task<Void> task) {
        }
    });
    FirebaseMessaging.getInstance().subscribeToTopic("incidents").addOnCompleteListener(new OnCompleteListener<Void>() {

        @Override
        public void onComplete(@NonNull Task<Void> task) {
        }
    });
    saveRanksCollection();
    RespondersRecyclerViewAdapter.ResponderClickListener responderClickListener = (view, position) -> {
        UserViewModel userViewModel = new ViewModelProvider(requireActivity()).get(UserViewModel.class);
        userViewModel.setUserDataModel(respondersList.get(position));
        NavDirections action = HomeFragmentDirections.actionHomeFragmentToUserFragment();
        Navigation.findNavController(binding.getRoot()).navigate(action);
    };
    IncidentRecyclerViewAdapter.IncidentClickListener incidentClickListener = (view, position) -> {
        IncidentDataModel incident = listOfIncidentDataModel.get(position);
        IncidentViewModel incidentViewModel = new ViewModelProvider(requireActivity()).get(IncidentViewModel.class);
        incidentViewModel.setIncidentDataModel(incident);
        NavDirections action = HomeFragmentDirections.actionHomeFragmentToIncidentFragment();
        Navigation.findNavController(binding.getRoot()).navigate(action);
    };
    // RecyclerViews
    RecyclerView incidentRecyclerView = bindingView.findViewById(R.id.incidents_recycler_view);
    incidentRecyclerView.setLayoutManager(new LinearLayoutManager(bindingView.getContext()));
    incidentRecyclerViewAdapter = new IncidentRecyclerViewAdapter(bindingView.getContext(), listOfIncidentDataModel);
    incidentRecyclerViewAdapter.setIncidentClickListener(incidentClickListener);
    incidentRecyclerView.setAdapter(incidentRecyclerViewAdapter);
    RecyclerView respondersRecyclerView = bindingView.findViewById(R.id.responders_recycler_view);
    respondersRecyclerView.setLayoutManager(new LinearLayoutManager(bindingView.getContext()));
    respondersRecyclerViewAdapter = new RespondersRecyclerViewAdapter(bindingView.getContext(), respondersList, listOfIncidentDataModel);
    respondersRecyclerViewAdapter.setResponderClickListener(responderClickListener);
    respondersRecyclerView.setAdapter(respondersRecyclerViewAdapter);
    // Start event listeners (live data)
    addIncidentEventListener();
    addResponderEventListener();
    return bindingView;
}
Also used : Bundle(android.os.Bundle) NonNull(androidx.annotation.NonNull) IncidentRecyclerViewAdapter(com.example.first_responder_app.recyclerViews.IncidentRecyclerViewAdapter) DrawerLocker(com.example.first_responder_app.interfaces.DrawerLocker) Task(com.google.android.gms.tasks.Task) MenuItem(android.view.MenuItem) NavController(androidx.navigation.NavController) ArrayList(java.util.ArrayList) QueryDocumentSnapshot(com.google.firebase.firestore.QueryDocumentSnapshot) IncidentDataModel(com.example.first_responder_app.dataModels.IncidentDataModel) PopupMenu(android.widget.PopupMenu) Toast(android.widget.Toast) Fragment(androidx.fragment.app.Fragment) HomeViewModel(com.example.first_responder_app.viewModels.HomeViewModel) View(android.view.View) ListenerRegistration(com.google.firebase.firestore.ListenerRegistration) RecyclerView(androidx.recyclerview.widget.RecyclerView) TAG(android.content.ContentValues.TAG) Log(android.util.Log) NavHostFragment(androidx.navigation.fragment.NavHostFragment) DataBindingUtil(androidx.databinding.DataBindingUtil) UsersDataModel(com.example.first_responder_app.dataModels.UsersDataModel) FragmentManager(androidx.fragment.app.FragmentManager) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections) LayoutInflater(android.view.LayoutInflater) SwipeRefreshLayout(androidx.swiperefreshlayout.widget.SwipeRefreshLayout) AppUtil(com.example.first_responder_app.AppUtil) FragmentHomeBinding(com.example.first_responder_app.databinding.FragmentHomeBinding) FirebaseMessaging(com.google.firebase.messaging.FirebaseMessaging) FirestoreDatabase(com.example.first_responder_app.FirestoreDatabase) IncidentViewModel(com.example.first_responder_app.viewModels.IncidentViewModel) OnCompleteListener(com.google.android.gms.tasks.OnCompleteListener) FragmentTransaction(androidx.fragment.app.FragmentTransaction) ViewGroup(android.view.ViewGroup) UserViewModel(com.example.first_responder_app.viewModels.UserViewModel) R(com.example.first_responder_app.R) FirebaseFirestore(com.google.firebase.firestore.FirebaseFirestore) List(java.util.List) Nullable(androidx.annotation.Nullable) Navigation(androidx.navigation.Navigation) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) RespondersRecyclerViewAdapter(com.example.first_responder_app.recyclerViews.RespondersRecyclerViewAdapter) RanksDataModel(com.example.first_responder_app.dataModels.RanksDataModel) IncidentViewModel(com.example.first_responder_app.viewModels.IncidentViewModel) RespondersRecyclerViewAdapter(com.example.first_responder_app.recyclerViews.RespondersRecyclerViewAdapter) IncidentDataModel(com.example.first_responder_app.dataModels.IncidentDataModel) NavController(androidx.navigation.NavController) DrawerLocker(com.example.first_responder_app.interfaces.DrawerLocker) FragmentHomeBinding(com.example.first_responder_app.databinding.FragmentHomeBinding) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) SwipeRefreshLayout(androidx.swiperefreshlayout.widget.SwipeRefreshLayout) NavDirections(androidx.navigation.NavDirections) UserViewModel(com.example.first_responder_app.viewModels.UserViewModel) RecyclerView(androidx.recyclerview.widget.RecyclerView) IncidentRecyclerViewAdapter(com.example.first_responder_app.recyclerViews.IncidentRecyclerViewAdapter) NavHostFragment(androidx.navigation.fragment.NavHostFragment) PopupMenu(android.widget.PopupMenu) ViewModelProvider(androidx.lifecycle.ViewModelProvider)

Example 2 with DrawerLocker

use of com.example.first_responder_app.interfaces.DrawerLocker in project FirstResponse by mattpost1700.

the class LoginFragment method onCreateView.

@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    // lock drawer on login page
    DrawerLocker drawerLocker = ((DrawerLocker) getActivity());
    if (drawerLocker != null) {
        drawerLocker.setDrawerLocked(true);
    }
    Context context = getActivity();
    // binding fragment with nav_map by using navHostFragment, throw this block of code in there and that allows you to switch to other fragments
    binding = DataBindingUtil.inflate(inflater, R.layout.fragment_login, container, false);
    NavHostFragment navHostFragment = (NavHostFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
    assert navHostFragment != null;
    NavController navController = navHostFragment.getNavController();
    sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);
    // check whether user finished typing and query the data
    binding.loginUsername.addTextChangedListener(new TextWatcher() {

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
            last_text_edit = System.currentTimeMillis();
            handler.removeCallbacks(input_finish_checker);
        }

        @Override
        public void afterTextChanged(Editable editable) {
            mViewModel.setUsername(binding.loginUsername.getText().toString());
            if (binding.loginPassword.getText().length() > 0) {
                last_text_edit = System.currentTimeMillis();
                handler.postDelayed(input_finish_checker, 500);
            }
        }
    });
    binding.loginPassword.addTextChangedListener(new TextWatcher() {

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
            last_text_edit = System.currentTimeMillis();
            handler.removeCallbacks(input_finish_checker);
        }

        @Override
        public void afterTextChanged(Editable editable) {
            mViewModel.setPassword(binding.loginPassword.getText().toString());
            if (binding.loginPassword.getText().length() > 0) {
                last_text_edit = System.currentTimeMillis();
                handler.postDelayed(input_finish_checker, 500);
            }
        }
    });
    binding.loginCreateAccountFab.setOnClickListener(v -> {
        NavDirections action = LoginFragmentDirections.actionLoginFragmentToCreateUserFragment();
        Navigation.findNavController(binding.getRoot()).navigate(action);
    });
    binding.loginCreateDepartmentFab.setOnClickListener(v -> {
        NavDirections action = LoginFragmentDirections.actionLoginFragmentToCreateDepartmentFragment();
        Navigation.findNavController(binding.getRoot()).navigate(action);
    });
    binding.loginSubmit.setOnClickListener(v -> {
        if (mViewModel.getUsername() == null || mViewModel.getPassword() == null) {
            binding.loginLog.setText(R.string.loginFailMsg);
            binding.loginLog.setVisibility(View.VISIBLE);
            Log.d("testing", "login failed: wrong username/password");
        } else {
            if (checkUsernameExists(mViewModel.getUsername())) {
                if (checkPwMatch(mViewModel.getUsername(), mViewModel.getPassword())) {
                    // wraps the shared preferences and auto encrypts keys and values using a two-schemed method
                    try {
                        SharedPreferences.Editor editor = sharedPref.edit();
                        editor.putString("savedUsername", mViewModel.getUsername());
                        editor.putString("savedPassword", mViewModel.getPassword());
                        editor.apply();
                        String masterKeyAlias = MasterKeys.getOrCreate(MasterKeys.AES256_GCM_SPEC);
                        sharedPref = EncryptedSharedPreferences.create("secret_shared_prefs", masterKeyAlias, context, EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV, EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM);
                    } catch (Exception e) {
                        Log.d("Login Encryption: ", "Encryption failed");
                    }
                    ActiveUser activeUser = ((ActiveUser) getActivity());
                    activeUser.setActive(user);
                    successfullyHidAdminOptions();
                    NavDirections action = LoginFragmentDirections.actionLoginFragmentToHomeFragment();
                    Navigation.findNavController(binding.getRoot()).navigate(action);
                    Log.d("testing", "username: " + mViewModel.getUsername() + " pw: " + mViewModel.getPassword() + " Login success.");
                } else {
                    binding.loginLog.setText(R.string.loginFailMsg);
                    binding.loginLog.setVisibility(View.VISIBLE);
                    Log.d("testing", "login failed: wrong username/password");
                }
            } else {
                binding.loginLog.setText(R.string.loginFailMsg);
                binding.loginLog.setVisibility(View.VISIBLE);
                Log.d("testing", "login failed: wrong username/password");
            }
        }
    });
    binding.bypassBtn.setOnClickListener(v -> {
        successfullyHidAdminOptions();
        NavDirections action = LoginFragmentDirections.actionLoginFragmentToHomeFragment();
        Navigation.findNavController(binding.getRoot()).navigate(action);
    });
    return binding.getRoot();
}
Also used : Context(android.content.Context) EncryptedSharedPreferences(androidx.security.crypto.EncryptedSharedPreferences) SharedPreferences(android.content.SharedPreferences) NavController(androidx.navigation.NavController) DrawerLocker(com.example.first_responder_app.interfaces.DrawerLocker) NavDirections(androidx.navigation.NavDirections) ActiveUser(com.example.first_responder_app.interfaces.ActiveUser) TextWatcher(android.text.TextWatcher) Editable(android.text.Editable) NavHostFragment(androidx.navigation.fragment.NavHostFragment)

Example 3 with DrawerLocker

use of com.example.first_responder_app.interfaces.DrawerLocker in project FirstResponse by mattpost1700.

the class CreateDepartmentFragment method onCreateView.

@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    DrawerLocker drawerLocker = ((DrawerLocker) getActivity());
    if (drawerLocker != null) {
        drawerLocker.setDrawerLocked(true);
    }
    CreateDepartmentFragmentBinding binding = DataBindingUtil.inflate(inflater, R.layout.create_department_fragment, container, false);
    NavHostFragment navHostFragment = (NavHostFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
    binding.createDepartmentCreateButton.setOnClickListener(v -> {
        String location = binding.createDepartmentLocationEditText.getText().toString();
        String name = binding.createDepartmentNameEditText.getText().toString();
        FireDepartmentDataModel fireDepartmentDataModel = new FireDepartmentDataModel(location, name);
        if (!location.equals("") && !name.equals("")) {
            FirestoreDatabase.getInstance().getDb().collection(FirestoreDatabase.FIRE_DEPARTMENT_COLLECTION_DIR).add(fireDepartmentDataModel).addOnSuccessListener(documentReference -> {
                String fireDeptId = documentReference.getId();
                new AlertDialog.Builder(getContext()).setTitle("Remember this id!").setMessage("The only way for you or anyone else to join this department is with this id. You cannot get this id again until someone joins the department." + "\n\nID: " + fireDeptId).setIcon(android.R.drawable.ic_dialog_alert).setNegativeButton(android.R.string.ok, (dialog, which) -> {
                    NavDirections action = CreateDepartmentFragmentDirections.actionCreateDepartmentFragmentToLoginFragment();
                    Navigation.findNavController(binding.getRoot()).navigate(action);
                }).setPositiveButton("Create account for department", (dialog, which) -> {
                    CreateUserViewModel createUserViewModel = new ViewModelProvider(requireActivity()).get(CreateUserViewModel.class);
                    createUserViewModel.setFireDepartmentId(fireDeptId);
                    NavDirections action = CreateDepartmentFragmentDirections.actionCreateDepartmentFragmentToCreateUserFragment();
                    Navigation.findNavController(binding.getRoot()).navigate(action);
                }).setNeutralButton("Copy ID to clipboard", (dialog, which) -> {
                    ClipboardManager clipboard = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
                    ClipData clip = ClipData.newPlainText("Copied Text", fireDeptId);
                    clipboard.setPrimaryClip(clip);
                }).show();
            }).addOnFailureListener(e -> Toast.makeText(getContext(), "Failed to make fire department", Toast.LENGTH_SHORT).show());
        } else {
            Toast.makeText(getContext(), "Invalid entries", Toast.LENGTH_SHORT).show();
        }
    });
    return binding.getRoot();
}
Also used : Context(android.content.Context) Bundle(android.os.Bundle) AlertDialog(androidx.appcompat.app.AlertDialog) CreateUserViewModel(com.example.first_responder_app.viewModels.CreateUserViewModel) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections) LayoutInflater(android.view.LayoutInflater) NonNull(androidx.annotation.NonNull) FirestoreDatabase(com.example.first_responder_app.FirestoreDatabase) CreateDepartmentFragmentBinding(com.example.first_responder_app.databinding.CreateDepartmentFragmentBinding) CreateDepartmentViewModel(com.example.first_responder_app.viewModels.CreateDepartmentViewModel) ViewGroup(android.view.ViewGroup) DrawerLocker(com.example.first_responder_app.interfaces.DrawerLocker) FireDepartmentDataModel(com.example.first_responder_app.dataModels.FireDepartmentDataModel) ClipData(android.content.ClipData) R(com.example.first_responder_app.R) Nullable(androidx.annotation.Nullable) Toast(android.widget.Toast) Fragment(androidx.fragment.app.Fragment) ClipboardManager(android.content.ClipboardManager) View(android.view.View) Navigation(androidx.navigation.Navigation) NavHostFragment(androidx.navigation.fragment.NavHostFragment) DataBindingUtil(androidx.databinding.DataBindingUtil) ClipboardManager(android.content.ClipboardManager) CreateDepartmentFragmentBinding(com.example.first_responder_app.databinding.CreateDepartmentFragmentBinding) FireDepartmentDataModel(com.example.first_responder_app.dataModels.FireDepartmentDataModel) DrawerLocker(com.example.first_responder_app.interfaces.DrawerLocker) CreateUserViewModel(com.example.first_responder_app.viewModels.CreateUserViewModel) NavHostFragment(androidx.navigation.fragment.NavHostFragment) ClipData(android.content.ClipData) NavDirections(androidx.navigation.NavDirections) ViewModelProvider(androidx.lifecycle.ViewModelProvider)

Example 4 with DrawerLocker

use of com.example.first_responder_app.interfaces.DrawerLocker in project FirstResponse by mattpost1700.

the class CreateUserFragment method onCreateView.

@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    DrawerLocker drawerLocker = ((DrawerLocker) getActivity());
    if (drawerLocker != null) {
        drawerLocker.setDrawerLocked(true);
    }
    binding = DataBindingUtil.inflate(inflater, R.layout.create_user_fragment, container, false);
    mViewModel = new ViewModelProvider(requireActivity()).get(CreateUserViewModel.class);
    binding.createUserFireDepartmentIdEditText.setText(mViewModel.getFireDepartmentId());
    binding.createUserCreateButton.setOnClickListener(v -> {
        if (validInput()) {
            FirestoreDatabase.getInstance().getDb().collection(FirestoreDatabase.FIRE_DEPARTMENT_COLLECTION_DIR).document(binding.createUserFireDepartmentIdEditText.getText().toString()).get().addOnSuccessListener(documentSnapshot -> {
                if (documentSnapshot.toObject(UsersDataModel.class) != null) {
                    UsersDataModel newUser = new UsersDataModel();
                    fillUser(newUser);
                    FirestoreDatabase.getInstance().getDb().collection(FirestoreDatabase.USERS_COLLECTION_DIR).add(newUser).addOnSuccessListener(documentReference -> {
                        // Success, login
                        if (FirestoreDatabase.getInstance().setActiveUser(newUser)) {
                            newUser.setDocumentId(documentReference.getId());
                            ActiveUser activeUser = ((ActiveUser) getActivity());
                            activeUser.setActive(newUser);
                            NavDirections action = CreateUserFragmentDirections.actionCreateUserFragmentToHomeFragment();
                            Navigation.findNavController(binding.getRoot()).navigate(action);
                        } else {
                            Toast.makeText(getContext(), "User does not have a department", Toast.LENGTH_SHORT).show();
                        }
                    }).addOnFailureListener(e -> Toast.makeText(getContext(), "Failed to upload user. Network error", Toast.LENGTH_SHORT).show());
                } else {
                    Toast.makeText(getContext(), "Fire department does not exist", Toast.LENGTH_SHORT).show();
                }
            }).addOnFailureListener(e -> Toast.makeText(getContext(), "Cannot check for fire department. Network error", Toast.LENGTH_SHORT).show());
        } else {
            Toast.makeText(getContext(), "You must fill all of the text fields", Toast.LENGTH_SHORT).show();
        }
    });
    return binding.getRoot();
}
Also used : UsersDataModel(com.example.first_responder_app.dataModels.UsersDataModel) Bundle(android.os.Bundle) CreateUserViewModel(com.example.first_responder_app.viewModels.CreateUserViewModel) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections) LayoutInflater(android.view.LayoutInflater) NonNull(androidx.annotation.NonNull) FirestoreDatabase(com.example.first_responder_app.FirestoreDatabase) ViewGroup(android.view.ViewGroup) DrawerLocker(com.example.first_responder_app.interfaces.DrawerLocker) R(com.example.first_responder_app.R) ActiveUser(com.example.first_responder_app.interfaces.ActiveUser) Nullable(androidx.annotation.Nullable) Toast(android.widget.Toast) Fragment(androidx.fragment.app.Fragment) View(android.view.View) Navigation(androidx.navigation.Navigation) CreateUserFragmentBinding(com.example.first_responder_app.databinding.CreateUserFragmentBinding) DataBindingUtil(androidx.databinding.DataBindingUtil) UsersDataModel(com.example.first_responder_app.dataModels.UsersDataModel) ActiveUser(com.example.first_responder_app.interfaces.ActiveUser) DrawerLocker(com.example.first_responder_app.interfaces.DrawerLocker) CreateUserViewModel(com.example.first_responder_app.viewModels.CreateUserViewModel) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections)

Aggregations

NavDirections (androidx.navigation.NavDirections)4 DrawerLocker (com.example.first_responder_app.interfaces.DrawerLocker)4 Bundle (android.os.Bundle)3 LayoutInflater (android.view.LayoutInflater)3 View (android.view.View)3 ViewGroup (android.view.ViewGroup)3 Toast (android.widget.Toast)3 NonNull (androidx.annotation.NonNull)3 Nullable (androidx.annotation.Nullable)3 DataBindingUtil (androidx.databinding.DataBindingUtil)3 Fragment (androidx.fragment.app.Fragment)3 ViewModelProvider (androidx.lifecycle.ViewModelProvider)3 Navigation (androidx.navigation.Navigation)3 NavHostFragment (androidx.navigation.fragment.NavHostFragment)3 FirestoreDatabase (com.example.first_responder_app.FirestoreDatabase)3 R (com.example.first_responder_app.R)3 Context (android.content.Context)2 NavController (androidx.navigation.NavController)2 UsersDataModel (com.example.first_responder_app.dataModels.UsersDataModel)2 ActiveUser (com.example.first_responder_app.interfaces.ActiveUser)2