-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
530 additions
and
183 deletions.
There are no files selected for viewing
314 changes: 314 additions & 0 deletions
314
...dea/shelf/Uncommitted_changes_before_Checkout_at_5_18_24,_7_44 PM_[Changes]/shelved.patch
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
UMC_6th/.idea/shelf/Uncommitted_changes_before_Checkout_at_5_18_24__7_44PM__Changes_.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
...idea/shelf/Uncommitted_changes_before_Checkout_at_5_1_24,_6_28 PM_[Changes]/shelved.patch
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
UMC_6th/.idea/shelf/Uncommitted_changes_before_Checkout_at_5_1_24__6_28PM__Changes_.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.example.umc_6th | ||
|
||
import java.util.ArrayList | ||
|
||
data class Album( | ||
var title: String? = "", | ||
var singer: String? = "", | ||
var coverImg: Int? = null, | ||
var songs: ArrayList<Song>? = null | ||
) |
32 changes: 32 additions & 0 deletions
32
UMC_6th/app/src/main/java/com/example/umc_6th/AlbumRVAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.example.umc_6th | ||
|
||
import android.view.LayoutInflater | ||
import android.view.ViewGroup | ||
import androidx.recyclerview.widget.RecyclerView | ||
import com.example.umc_6th.databinding.ItemAlbumBinding | ||
|
||
class AlbumRVAdapter(private val albumlist:ArrayList<Album>) : RecyclerView.Adapter<AlbumRVAdapter.ViewHolder>() { | ||
|
||
override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): AlbumRVAdapter.ViewHolder { | ||
val binding: ItemAlbumBinding = ItemAlbumBinding.inflate(LayoutInflater.from(viewGroup.context),viewGroup,false) | ||
|
||
return ViewHolder(binding) | ||
} | ||
|
||
override fun onBindViewHolder(holder: AlbumRVAdapter.ViewHolder, position: Int) { | ||
holder.bind(albumlist[position]) | ||
} | ||
|
||
override fun getItemCount(): Int = albumlist.size | ||
|
||
inner class ViewHolder(val binding:ItemAlbumBinding): RecyclerView.ViewHolder(binding.root){ | ||
fun bind(album: Album){ | ||
binding.itemAlbumTitleTv.text = album.title | ||
binding.itemAlbumSingerTv.text = album.singer | ||
binding.itemAlbumCoverImgIv.setImageResource(album.coverImg!!) | ||
} | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.