diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumRVAdapter.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumRVAdapter.kt index 0e0e32a..18bd86f 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumRVAdapter.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumRVAdapter.kt @@ -39,7 +39,7 @@ class AlbumRVAdapter(private val albumlist: ArrayList): RecyclerView.Adap } // holder.binding.itemAlbumTitleTv.setOnClickListener { mItemClickListener.onRemoveAlbum(position) holder.binding.itemAlbumPlayImgIv.setOnClickListener { - myItemClickListener.onItemClick(albumlist[position]) + myItemClickListener.onPlayAlbum(albumlist[position]) } } diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/MainActivity.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/MainActivity.kt index e8d3293..6b2a110 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/MainActivity.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/MainActivity.kt @@ -15,6 +15,7 @@ class MainActivity : AppCompatActivity() { lateinit var binding : ActivityMainBinding lateinit var activityResultLauncher: ActivityResultLauncher + private var song:Song = Song() private var gson: Gson = Gson() @@ -26,6 +27,7 @@ class MainActivity : AppCompatActivity() { setBottomNavigationView() + // MainActivity에서 SongActivity로 데이터 값 넘기기 위한 변수명 지정 // val song = Song(binding.mainPlayTitleTv.text.toString(), binding.mainPlaySingerTv.text.toString(),0,60,false,"music_lilac")