-
Notifications
You must be signed in to change notification settings - Fork 12
[김석현_ Android] 10주차 과제 제출 #73
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?
Conversation
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.
strings.xml 쪽의 관심이 필요해보입니다.
지난번 과제에서도 같은 문제가 다수 발생하였기에
이번 과제는 일부 감점이 있겠습니다.
| ) { isGranted -> | ||
| if (isGranted) { | ||
| loadMusicFiles() | ||
| Toast.makeText(this, "Permission granted", 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.
Toast message 는 strings.xml 써주세요
| } | ||
| } | ||
| currentlyPlaying = item | ||
| Toast.makeText(this, "\"${item.title}\" playing now", 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.
마찬가지 입니다
|
|
||
| private fun pauseMusic() { | ||
| mediaPlayer?.pause() | ||
| Toast.makeText(this, "일시정지", 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.
마찬가지 입니다
| private fun showPermissionDeniedDialog() { | ||
| AlertDialog.Builder(this) | ||
| .setTitle("권한 필요") | ||
| .setMessage("음악 파일을 표시하려면 권한이 필요합니다.\n\n설정에서 권한을 허용해주세요.") |
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.
메시지 모두 strings.xml 이용해주세요
|
|
||
| while (it.moveToNext()) { | ||
| val id = it.getLong(idColumn) | ||
| val title = it.getString(titleColumn) ?: "Unknown Title" |
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.
이런 부분도 전부 strings.xml 이용해주세요
사용자에게 보이는 부분은 모두 strings.xml 에 넣어주는게 좋습니다.
이 외에도 "" 를 이용하는게 아닌 Constant 를 하나 만들어 상수를 모아 만든 후
해당 함수를 참조하는 형태로 Activity 나 viewModel 에서는 참조의 형태가 좋습니다.
TT