-
Notifications
You must be signed in to change notification settings - Fork 0
8주차 과제 PR #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
8주차 과제 PR #5
Conversation
skdud0629
left a comment
There was a problem hiding this 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() |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| btnShowToast.setOnClickListener() { | |
| binding.toastButton.setOnClickListener() { |
| activityData.edit().putInt("count", count).apply() | ||
|
|
||
| val randomIntent = Intent(context, RandomActivity::class.java).apply { | ||
| putExtra("countData", count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
countData를 상수로 정의해서 사용하면 더 좋을 것 같습니당
8주차 과제 PR입니다.