Skip to content

Conversation

@kimseokhyeon1210
Copy link

TT

kimseokhyeon1210 added 2 commits June 24, 2025 03:31
Copy link

@KYM-P KYM-P left a 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()
Copy link

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()
Copy link

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()
Copy link

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설정에서 권한을 허용해주세요.")
Copy link

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"
Copy link

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 에서는 참조의 형태가 좋습니다.

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.

2 participants