From ece1d9f193f4dd2fda92b408c0e4b87fef5c1cc4 Mon Sep 17 00:00:00 2001 From: kimdowoo Date: Tue, 11 Apr 2023 20:25:36 +0900 Subject: [PATCH] =?UTF-8?q?[BUD-56]=20feat=20:=20buddy=20navigation=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=B6=80=EB=B6=84=20=EB=B6=84=EB=A6=AC(#4?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/deploymentTargetDropDown.xml | 13 ++++++++- .../buddy/ui/InputBuddyTypeFragment.kt | 10 ++++--- .../src/main/res/navigation/nav_addbuddy.xml | 23 +++++++++++++++- buddy/src/main/res/navigation/nav_buddy.xml | 27 +++---------------- .../nocapstone/common_ui/MainActivityUtil.kt | 1 - .../onboarding/ui/InputUserInfoFragment.kt | 2 +- .../main/res/navigation/nav_onboarding.xml | 4 +-- 7 files changed, 47 insertions(+), 33 deletions(-) diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index 430e3f7..e625f67 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -1,6 +1,17 @@ + + + + + + + + + + + @@ -12,6 +23,6 @@ - + \ No newline at end of file diff --git a/buddy/src/main/java/com/nocapstone/buddyvet/buddy/ui/InputBuddyTypeFragment.kt b/buddy/src/main/java/com/nocapstone/buddyvet/buddy/ui/InputBuddyTypeFragment.kt index cb0b360..7d1f1db 100644 --- a/buddy/src/main/java/com/nocapstone/buddyvet/buddy/ui/InputBuddyTypeFragment.kt +++ b/buddy/src/main/java/com/nocapstone/buddyvet/buddy/ui/InputBuddyTypeFragment.kt @@ -28,12 +28,14 @@ class InputBuddyTypeFragment : Fragment() { // Inflate the layout for this fragment _binding = FragmentInputBuddyTypeBinding.inflate(inflater, container, false) - - (activity as MainActivityUtil).run { - setToolbarTitle("버디 추가") - setVisibilityBottomAppbar(View.GONE) + if (activity is MainActivityUtil){ + (activity as MainActivityUtil).run { + setToolbarTitle("버디 추가") + setVisibilityBottomAppbar(View.GONE) + } } + return binding.root } diff --git a/buddy/src/main/res/navigation/nav_addbuddy.xml b/buddy/src/main/res/navigation/nav_addbuddy.xml index 00902b1..296530f 100644 --- a/buddy/src/main/res/navigation/nav_addbuddy.xml +++ b/buddy/src/main/res/navigation/nav_addbuddy.xml @@ -1,6 +1,27 @@ + android:id="@+id/nav_addbuddy" + app:startDestination="@id/inputBuddyTypeFragment"> + + + + + + + \ No newline at end of file diff --git a/buddy/src/main/res/navigation/nav_buddy.xml b/buddy/src/main/res/navigation/nav_buddy.xml index 17009f8..17ec945 100644 --- a/buddy/src/main/res/navigation/nav_buddy.xml +++ b/buddy/src/main/res/navigation/nav_buddy.xml @@ -4,36 +4,16 @@ android:id="@+id/nav_buddy" app:startDestination="@id/myBuddyFragment"> - - - - - - - - + + \ No newline at end of file diff --git a/common-ui/src/main/java/com/nocapstone/common_ui/MainActivityUtil.kt b/common-ui/src/main/java/com/nocapstone/common_ui/MainActivityUtil.kt index b63e5f2..0310066 100644 --- a/common-ui/src/main/java/com/nocapstone/common_ui/MainActivityUtil.kt +++ b/common-ui/src/main/java/com/nocapstone/common_ui/MainActivityUtil.kt @@ -1,6 +1,5 @@ package com.nocapstone.common_ui -import androidx.fragment.app.Fragment interface MainActivityUtil{ fun setToolbarTitle(newTitle: String) diff --git a/onboarding/src/main/java/com/nocapstone/onboarding/ui/InputUserInfoFragment.kt b/onboarding/src/main/java/com/nocapstone/onboarding/ui/InputUserInfoFragment.kt index 68318d4..981e5ca 100644 --- a/onboarding/src/main/java/com/nocapstone/onboarding/ui/InputUserInfoFragment.kt +++ b/onboarding/src/main/java/com/nocapstone/onboarding/ui/InputUserInfoFragment.kt @@ -32,7 +32,7 @@ class InputUserInfoFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) binding.next.setOnClickListener { - splashViewModel.postUserInfo(binding.nameEt.toString()){ + splashViewModel.postUserInfo(binding.nameEt.text.toString()){ findNavController().navigate(R.id.next) } } diff --git a/onboarding/src/main/res/navigation/nav_onboarding.xml b/onboarding/src/main/res/navigation/nav_onboarding.xml index b0d8c9e..7c1181e 100644 --- a/onboarding/src/main/res/navigation/nav_onboarding.xml +++ b/onboarding/src/main/res/navigation/nav_onboarding.xml @@ -26,7 +26,7 @@ android:label="InputUserInfoFragment" > + app:destination="@id/nav_addbuddy" /> - + \ No newline at end of file