diff --git a/app/src/main/java/umc/com/mobile/project/ui/setting/SettingFragment.kt b/app/src/main/java/umc/com/mobile/project/ui/setting/SettingFragment.kt index c060293..975860b 100644 --- a/app/src/main/java/umc/com/mobile/project/ui/setting/SettingFragment.kt +++ b/app/src/main/java/umc/com/mobile/project/ui/setting/SettingFragment.kt @@ -4,6 +4,7 @@ import android.app.AlertDialog import android.content.DialogInterface import android.content.Intent import android.os.Bundle +import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -33,11 +34,13 @@ class SettingFragment : Fragment() { _binding = FragmentSettingBinding.inflate(inflater, container, false) navigateFragment() + viewModel.getUserInfo() // 홈 화면 정보 조회 api viewModel.userInfoResponse.observe(viewLifecycleOwner, Observer { binding.tvAccountIdContent.text = it?.result?.id.toString() - binding.tvAccountMajorContent.text = - "1트랙: ${it?.result?.track1} / 트랙: ${it?.result?.track2}" + Log.d("setting", it?.result?.id.toString()) + + binding.tvAccountMajorContent.text = it?.result?.department }) return binding.root diff --git a/app/src/main/res/layout/fragment_setting.xml b/app/src/main/res/layout/fragment_setting.xml index 87bad31..9af71af 100644 --- a/app/src/main/res/layout/fragment_setting.xml +++ b/app/src/main/res/layout/fragment_setting.xml @@ -100,7 +100,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="16dp" - android:text="@{vm.userInfoResponse.result.track1}" android:textColor="@color/light_gray" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@+id/tv_account_major" />