Skip to content

Conversation

@JaeYoung290
Copy link
Owner

8주차 과제 PR입니다.

Copy link

@skdud0629 skdud0629 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨어요! 👍

if (isGranted)
Toast.makeText(this, "Permission granted", Toast.LENGTH_SHORT).show()
else
Toast.makeText(this, "Permission denied", Toast.LENGTH_SHORT).show()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

권한이 거부되었을 때 사용되는 메소드가 따로 있습니다! 나중에 사용해보세용

shouldShowRequestPermissionRationale(Manifest.permission.READ_EXTERNAL_STORAGE)

}

val btnShowToast = binding.toastButton
btnShowToast.setOnClickListener() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
btnShowToast.setOnClickListener() {
binding.toastButton.setOnClickListener() {

activityData.edit().putInt("count", count).apply()

val randomIntent = Intent(context, RandomActivity::class.java).apply {
putExtra("countData", count)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

countData를 상수로 정의해서 사용하면 더 좋을 것 같습니당

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants