-
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
1 parent
c6ad832
commit 45d95cd
Showing
6 changed files
with
135 additions
and
43 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
34 changes: 27 additions & 7 deletions
34
UMC_6th/app/src/main/java/com/example/umc_6th/SavedSongFragment.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 |
---|---|---|
@@ -1,22 +1,42 @@ | ||
package com.example.umc_6th | ||
|
||
import android.os.Bundle | ||
import androidx.fragment.app.Fragment | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import com.example.umc_6th.databinding.FragmentSongBinding | ||
import androidx.fragment.app.Fragment | ||
import androidx.recyclerview.widget.LinearLayoutManager | ||
import com.example.umc_6th.databinding.FragmentSavedSongBinding | ||
|
||
class SavedSongFragment : Fragment(){ | ||
class SavedSongFragment : Fragment() { | ||
|
||
lateinit var binding: FragmentSongBinding | ||
private var albumDatas = ArrayList<Album>() | ||
lateinit var binding : FragmentSavedSongBinding | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
} | ||
|
||
override fun onCreateView( | ||
inflater: LayoutInflater, | ||
container: ViewGroup?, | ||
inflater: LayoutInflater, container: ViewGroup?, | ||
savedInstanceState: Bundle? | ||
): View? { | ||
binding = FragmentSongBinding.inflate(inflater,container,false) | ||
|
||
binding = FragmentSavedSongBinding.inflate(inflater, container, false) | ||
|
||
albumDatas.apply { | ||
add(Album("Butter", "방탄소년단 (BTS)", R.drawable.img_album_exp)) | ||
add(Album("Lilac", "아이유 (IU)", R.drawable.img_album_exp2)) | ||
add(Album("Next Level", "에스파 (AESPA)", R.drawable.img_album_exp3)) | ||
add(Album("Boy with Luv", "방탄소년단 (BTS)", R.drawable.img_album_exp4)) | ||
add(Album("BBoom BBoom", "모모랜드 (MOMOLAND)", R.drawable.img_album_exp5)) | ||
add(Album("Weekend", "태연 (Tae Yeon)", R.drawable.img_album_exp6)) | ||
} | ||
|
||
val lockerAlbumRVAdapter = LockerAlbumRVAdapter(albumDatas) | ||
binding.lockerMusicAlbumRv.adapter = lockerAlbumRVAdapter | ||
binding.lockerMusicAlbumRv.layoutManager = LinearLayoutManager(requireActivity()) | ||
|
||
return binding.root | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,16 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="저장된 곡이 없습니다" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
android:layout_height="match_parent"> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/locker_music_album_rv" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:orientation="vertical" | ||
android:overScrollMode="never" | ||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" | ||
app:layout_constraintBottom_toBottomOf="parent"/> | ||
tools:listitem="@layout/item_locker_album" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |