Skip to content

Commit

Permalink
[Feat/#82] CommunicationActivity 데이터 전달 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yeoncheong committed Jul 19, 2023
1 parent 4a674a5 commit 3371a67
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package com.sopt.umbba_android.presentation.onboarding

import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.util.Log
import com.sopt.umbba_android.R
import com.sopt.umbba_android.databinding.ActivityCommunicationBinding
import com.sopt.umbba_android.domain.entity.User
import com.sopt.umbba_android.util.binding.BindingActivity

class CommunicationActivity : BindingActivity<ActivityCommunicationBinding>(R.layout.activity_communication) {
Expand All @@ -15,7 +18,15 @@ class CommunicationActivity : BindingActivity<ActivityCommunicationBinding>(R.la

private fun goInputInfoActivity() {
binding.btnStart.setOnClickListener {
startActivity(Intent(this, InputInfoActivity::class.java))
val userData = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
intent.getParcelableExtra("userData", User::class.java)
} else {
intent.getParcelableExtra<User>("userData")
}
Log.e("yeonjin", "communication parcelable : ${userData?.isReceiver}")
startActivity(Intent(this, InputInfoActivity::class.java).apply {
putExtra("userData", userData)
})
}
}
}

0 comments on commit 3371a67

Please sign in to comment.