Skip to content

Commit

Permalink
mod/#5: scope 함수 사용해보기
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeeum committed Apr 18, 2024
1 parent 5012ed1 commit b27970a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/com/sopt/now/LoginActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ class LoginActivity : AppCompatActivity() {
ActivityResultContracts.StartActivityForResult()
) { result ->
if (result.resultCode == RESULT_OK) {
id = result.data?.getStringExtra("id") ?: ""
pw = result.data?.getStringExtra("pw") ?: ""
nick = result.data?.getStringExtra("nick") ?: ""
result.data?.let { data ->
id = data.getStringExtra("id") ?: ""
pw = data.getStringExtra("pw") ?: ""
nick = data.getStringExtra("nick") ?: ""
}
}
}
binding.btnLogin.setOnClickListener {
Expand Down

0 comments on commit b27970a

Please sign in to comment.