From 80ae3dfad064b74da0d4c15291835299520ab96a Mon Sep 17 00:00:00 2001 From: MrLetsplay Date: Tue, 20 Jun 2023 21:41:24 +0200 Subject: [PATCH] Rename files --- .../fragment/FirstFragment.java | 48 ------------------- ...{SecondFragment.java => HomeFragment.java} | 21 +++----- 2 files changed, 7 insertions(+), 62 deletions(-) delete mode 100644 app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/FirstFragment.java rename app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/{SecondFragment.java => HomeFragment.java} (54%) diff --git a/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/FirstFragment.java b/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/FirstFragment.java deleted file mode 100644 index 1a879be..0000000 --- a/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/FirstFragment.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.cringe_studios.cringe_authenticator.fragment; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - -import androidx.annotation.NonNull; -import androidx.fragment.app.Fragment; - -import com.cringe_studios.cringe_authenticator.databinding.FragmentFirstBinding; -import com.cringe_studios.cringe_authenticator.util.NavigationUtil; - -public class FirstFragment extends Fragment { - - private FragmentFirstBinding binding; - - @Override - public View onCreateView( - LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState - ) { - - binding = FragmentFirstBinding.inflate(inflater, container, false); - return binding.getRoot(); - - } - - public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); - - binding.buttonFirst.setOnClickListener(view1 -> { - /*NavHostFragment.findNavController(FirstFragment.this) - .navigate(R.id.action_FirstFragment_to_SecondFragment);*/ - - Bundle b = new Bundle(); - b.putString("sus", "Impostor"); - NavigationUtil.navigate(this, DynamicFragment.class, b); - }); - } - - @Override - public void onDestroyView() { - super.onDestroyView(); - binding = null; - } - -} \ No newline at end of file diff --git a/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/SecondFragment.java b/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/HomeFragment.java similarity index 54% rename from app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/SecondFragment.java rename to app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/HomeFragment.java index 2712051..eeb339d 100644 --- a/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/SecondFragment.java +++ b/app/src/main/java/com/cringe_studios/cringe_authenticator/fragment/HomeFragment.java @@ -8,30 +8,23 @@ import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; -import com.cringe_studios.cringe_authenticator.databinding.FragmentSecondBinding; -import com.cringe_studios.cringe_authenticator.util.NavigationUtil; +import com.cringe_studios.cringe_authenticator.databinding.FragmentHomeBinding; +import com.cringe_studios.cringe_authenticator.util.FabUtil; -public class SecondFragment extends Fragment { +public class HomeFragment extends Fragment { - private FragmentSecondBinding binding; + private FragmentHomeBinding binding; @Override - public View onCreateView( - LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState - ) { - - binding = FragmentSecondBinding.inflate(inflater, container, false); + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + binding = FragmentHomeBinding.inflate(inflater, container, false); + FabUtil.hideFabs(getActivity()); return binding.getRoot(); } public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); - - binding.buttonSecond.setOnClickListener(view1 -> { - NavigationUtil.navigate(this, FirstFragment.class, null); - }); } @Override