Skip to content

Conversation

@kkyoungchan
Copy link

No description provided.

@kkyoungchan kkyoungchan changed the title [김영찬_Android] 9주차 과제 [김영찬_Android] 9주차 과제 제출 Jun 23, 2025
Copy link

@jusang3057 jusang3057 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

val selection = "${MediaStore.Audio.Media.IS_MUSIC} != 0"
val sortOrder = "${MediaStore.Audio.Media.TITLE} ASC"

val cursor = contentResolver.query(

Choose a reason for hiding this comment

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

contentResolversms I/O작업이라 백그라운드 스레드를 사용하시면 좋습니다.

private fun showPermissionDialog() {
AlertDialog.Builder(this)
.setTitle(R.string.permdialog_title)
.setMessage(R.string.permdialog_title)

Choose a reason for hiding this comment

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

_title로 들어가 있네요. 아마 오타인듯합니다.

val title = it.getString(titleIndex) ?: "제목없음"
val artist = it.getString(artistIndex) ?: "가수없음"
val time = it.getLong(timeIndex)
musicList.add(Triple(title, artist, time))

Choose a reason for hiding this comment

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

음악 정보를 저장하는 데이터 클래스를 사용하면 가독성을 높일 수 있습니다!

@@ -0,0 +1,38 @@
package com.example.bcsd_android_2025_1
import android.Manifest

Choose a reason for hiding this comment

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

이 부분은 없어도 될 것 같습니다.

android:layout_height="match_parent">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"

Choose a reason for hiding this comment

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

네이밍컨밴션 지켜주세요

Copy link
Contributor

@kongwoojin kongwoojin left a comment

Choose a reason for hiding this comment

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

고생하셨습니다.
코멘트 확인해주세요

jvmTarget = "11"
}
buildFeatures {
compose = true
Copy link
Contributor

Choose a reason for hiding this comment

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

본 커리큘럼에서는 compose를 사용하지 않습니다.

import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView

class MusicAdapter(private val musicList: List<Triple<String, String, Long>>) :
Copy link
Contributor

Choose a reason for hiding this comment

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

Triple을 사용하면, 어떤 값이 무엇을 나타내는건지 알기 어렵습니다.
data class를 만들어주세요


override fun getItemCount() = musicList.size

private fun settime(timeMs: Long): String {
Copy link
Contributor

Choose a reason for hiding this comment

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

Long의 확장함수로 만드는게 좋아보입니다.

android:text="@string/text_music_artist"
android:textSize="14sp"/>

<TextView
Copy link
Contributor

Choose a reason for hiding this comment

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

artist와 같은 줄에 위치하게 해주세요

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