Skip to content

Commit

Permalink
Feat: 설정 아이디/학과 ui 연결 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
dkyuuum committed Feb 19, 2024
1 parent af52990 commit d5fb7ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down

0 comments on commit d5fb7ef

Please sign in to comment.