diff --git a/UMC_6th/app/src/main/AndroidManifest.xml b/UMC_6th/app/src/main/AndroidManifest.xml index 5175c7f..46b821c 100644 --- a/UMC_6th/app/src/main/AndroidManifest.xml +++ b/UMC_6th/app/src/main/AndroidManifest.xml @@ -13,10 +13,10 @@ android:supportsRtl="true" android:theme="@style/Theme.MyApplication" tools:targetApi="31"> - - + + @@ -26,7 +26,7 @@ diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/CommunicationInterface.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/CommunicationInterface.kt deleted file mode 100644 index a44b0f4..0000000 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/CommunicationInterface.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.example.myfirstapp - -interface CommunicationInterface { - fun sendData(album: Album) -} \ No newline at end of file diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/Album.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/Album.kt similarity index 86% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/Album.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/Album.kt index da27290..dc89cf4 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/Album.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/Album.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.entities import androidx.room.Entity import androidx.room.PrimaryKey diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/Like.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/Like.kt similarity index 82% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/Like.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/Like.kt index caa8d8a..20d2428 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/Like.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/Like.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.entities import androidx.room.Entity import androidx.room.PrimaryKey diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/Song.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/Song.kt similarity index 90% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/Song.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/Song.kt index 1a5b54b..eeb60de 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/Song.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/Song.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.entities import androidx.room.Entity import androidx.room.PrimaryKey diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/User.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/User.kt similarity index 89% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/User.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/User.kt index dfc9da7..a3391dc 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/User.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/entities/User.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.entities import androidx.room.Entity import androidx.room.PrimaryKey diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumDao.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/AlbumDao.kt similarity index 86% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumDao.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/AlbumDao.kt index 2826692..71d43bd 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumDao.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/AlbumDao.kt @@ -1,6 +1,8 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.local import androidx.room.* +import com.example.myfirstapp.data.entities.Album +import com.example.myfirstapp.data.entities.Like @Dao interface AlbumDao { diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongDao.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/SongDao.kt similarity index 85% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SongDao.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/SongDao.kt index ebcfb8f..1d07d32 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongDao.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/SongDao.kt @@ -1,6 +1,7 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.local import androidx.room.* +import com.example.myfirstapp.data.entities.Song @Dao interface SongDao { diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongDatabase.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/SongDatabase.kt similarity index 81% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SongDatabase.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/SongDatabase.kt index a9936a0..f6c8c4e 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongDatabase.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/SongDatabase.kt @@ -1,9 +1,13 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.local import android.content.Context import androidx.room.Database import androidx.room.Room import androidx.room.RoomDatabase +import com.example.myfirstapp.data.entities.Album +import com.example.myfirstapp.data.entities.Like +import com.example.myfirstapp.data.entities.Song +import com.example.myfirstapp.data.entities.User @Database(entities = [Song::class, Album::class , User::class, Like::class], version = 1) abstract class SongDatabase: RoomDatabase() { diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/UserDao.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/UserDao.kt similarity index 77% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/UserDao.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/UserDao.kt index d512aa2..fbe6e2d 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/UserDao.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/local/UserDao.kt @@ -1,6 +1,7 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.local import androidx.room.* +import com.example.myfirstapp.data.entities.User @Dao interface UserDao { diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/ApiRepository.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/ApiRepository.kt similarity index 73% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/ApiRepository.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/ApiRepository.kt index c5005d4..2a32d76 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/ApiRepository.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/ApiRepository.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote class ApiRepository { companion object { diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/AuthApi.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/AuthApi.kt similarity index 71% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/AuthApi.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/AuthApi.kt index dc70619..682a538 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/AuthApi.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/AuthApi.kt @@ -1,6 +1,7 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote +import com.example.myfirstapp.data.entities.User import retrofit2.Call import retrofit2.http.* diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/AuthResponse.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/AuthResponse.kt similarity index 65% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/AuthResponse.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/AuthResponse.kt index 9c1715f..2682262 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/AuthResponse.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/AuthResponse.kt @@ -1,3 +1,3 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote data class AuthResponse(val isSucess:Boolean, val code:Int, val message:String) diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/AuthService.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/AuthService.kt similarity index 90% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/AuthService.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/AuthService.kt index d08f29a..a28b3c0 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/AuthService.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/AuthService.kt @@ -1,6 +1,9 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote import android.util.Log +import com.example.myfirstapp.ui.signin.LoginView +import com.example.myfirstapp.ui.singup.SignUpView +import com.example.myfirstapp.data.entities.User import retrofit2.Call import retrofit2.Callback import retrofit2.Response diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/BaseResponse.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/BaseResponse.kt similarity index 86% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/BaseResponse.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/BaseResponse.kt index ea86b48..c191155 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/BaseResponse.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/BaseResponse.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote import com.google.gson.annotations.SerializedName diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/CommunicationInterface.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/CommunicationInterface.kt new file mode 100644 index 0000000..816270a --- /dev/null +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/CommunicationInterface.kt @@ -0,0 +1,7 @@ +package com.example.myfirstapp.data.remote + +import com.example.myfirstapp.data.entities.Album + +interface CommunicationInterface { + fun sendData(album: Album) +} \ No newline at end of file diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/Result.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/Result.kt similarity index 79% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/Result.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/Result.kt index 8647752..e1edc27 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/Result.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/Result.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote import com.google.gson.annotations.SerializedName diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/RetrofitInstance.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/RetrofitInstance.kt similarity index 91% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/RetrofitInstance.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/RetrofitInstance.kt index 79563e5..c070335 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/RetrofitInstance.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/RetrofitInstance.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongApi.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/SongApi.kt similarity index 75% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SongApi.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/SongApi.kt index 46ecb03..75208a8 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongApi.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/SongApi.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote import retrofit2.Call import retrofit2.http.GET diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongResponse.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/SongResponse.kt similarity index 93% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SongResponse.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/SongResponse.kt index a218823..771fc17 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongResponse.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/SongResponse.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote import com.google.gson.annotations.SerializedName diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongService.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/SongService.kt similarity index 92% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SongService.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/SongService.kt index a321624..ff80323 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongService.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/data/remote/SongService.kt @@ -1,6 +1,7 @@ -package com.example.myfirstapp +package com.example.myfirstapp.data.remote import android.util.Log +import com.example.myfirstapp.ui.main.look.LookView import retrofit2.Call import retrofit2.Callback import retrofit2.Response diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumRVAdapter.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/AlbumRVAdapter.kt similarity index 91% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumRVAdapter.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/AlbumRVAdapter.kt index b38238c..6c78744 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumRVAdapter.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/AlbumRVAdapter.kt @@ -1,8 +1,9 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.adapter import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView +import com.example.myfirstapp.data.entities.Album import com.example.myfirstapp.databinding.ItemAlbumBinding class AlbumRVAdapter(private val albumlist: ArrayList): RecyclerView.Adapter() { @@ -27,12 +28,12 @@ class AlbumRVAdapter(private val albumlist: ArrayList): RecyclerView.Adap albumlist.removeAt(position) notifyDataSetChanged() } - override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AlbumRVAdapter.ViewHolder { + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { val binding : ItemAlbumBinding = ItemAlbumBinding.inflate(LayoutInflater.from(parent.context), parent, false) return ViewHolder(binding) } - override fun onBindViewHolder(holder: AlbumRVAdapter.ViewHolder, position: Int) { + override fun onBindViewHolder(holder: ViewHolder, position: Int) { holder.bind(albumlist[position]) holder.itemView.setOnClickListener{ myItemClickListener.onItemClick(albumlist[position]) diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumVpAdapter.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/AlbumVpAdapter.kt similarity index 66% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumVpAdapter.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/AlbumVpAdapter.kt index 8052cc1..2643c0d 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumVpAdapter.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/AlbumVpAdapter.kt @@ -1,7 +1,10 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.adapter import androidx.fragment.app.Fragment import androidx.viewpager2.adapter.FragmentStateAdapter +import com.example.myfirstapp.ui.main.album.DetailFragment +import com.example.myfirstapp.ui.main.album.SongFragment +import com.example.myfirstapp.ui.main.album.VideoFragment class AlbumVpAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) { override fun getItemCount(): Int = 3 diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/BannerVPAdapter.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/BannerVPAdapter.kt similarity index 92% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/BannerVPAdapter.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/BannerVPAdapter.kt index 36ff8ba..e1b0b3f 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/BannerVPAdapter.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/BannerVPAdapter.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.adapter import androidx.fragment.app.Fragment import androidx.viewpager2.adapter.FragmentStateAdapter diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/LockerAlbumRVAdapter.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/LockerAlbumRVAdapter.kt similarity index 92% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/LockerAlbumRVAdapter.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/LockerAlbumRVAdapter.kt index 18f1a51..c96cc75 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/LockerAlbumRVAdapter.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/adapter/LockerAlbumRVAdapter.kt @@ -1,9 +1,10 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.adapter import android.util.SparseBooleanArray import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView +import com.example.myfirstapp.data.entities.Song import com.example.myfirstapp.databinding.ItemLockerAlbumBinding class LockerAlbumRVAdapter () : RecyclerView.Adapter() { @@ -13,14 +14,14 @@ class LockerAlbumRVAdapter () : RecyclerView.Adapter() { @@ -19,13 +20,13 @@ class SavedAlbumRVAdapter (): RecyclerView.Adapter() { - override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): SongRVAdapter.ViewHolder { + override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder { val binding: ItemSongBinding = ItemSongBinding.inflate(LayoutInflater.from(viewGroup.context), viewGroup, false) return ViewHolder(binding) } - override fun onBindViewHolder(holder: SongRVAdapter.ViewHolder, position: Int) { + override fun onBindViewHolder(holder: ViewHolder, position: Int) { //holder.bind(result.songs[position]) if(result.songs[position].coverImgUrl == "" || result.songs[position].coverImgUrl == null){ diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/MainActivity.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/MainActivity.kt similarity index 92% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/MainActivity.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/MainActivity.kt index d750500..99e544a 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/MainActivity.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main import android.content.Intent import android.os.Bundle @@ -7,8 +7,16 @@ import android.widget.Toast import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AppCompatActivity +import com.example.myfirstapp.R +import com.example.myfirstapp.ui.main.search.SearchFragment +import com.example.myfirstapp.ui.song.SongActivity +import com.example.myfirstapp.data.local.SongDatabase +import com.example.myfirstapp.data.entities.Album +import com.example.myfirstapp.data.entities.Song import com.example.myfirstapp.databinding.ActivityMainBinding -import com.google.gson.Gson +import com.example.myfirstapp.ui.main.home.HomeFragment +import com.example.myfirstapp.ui.main.locker.LockerFragment +import com.example.myfirstapp.ui.main.look.LookFragment class MainActivity : AppCompatActivity() { @@ -48,7 +56,7 @@ class MainActivity : AppCompatActivity() { editor.putInt("songId", songs[nowPos].id) editor.apply() - val intent = Intent(this,SongActivity::class.java) + val intent = Intent(this, SongActivity::class.java) activityResultLauncher.launch(intent) } diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/AlbumFragment.kt similarity index 85% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/AlbumFragment.kt index 98e8ea6..5df1bff 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/AlbumFragment.kt @@ -1,12 +1,18 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.album import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.Fragment +import com.example.myfirstapp.ui.adapter.AlbumVpAdapter +import com.example.myfirstapp.ui.main.home.HomeFragment +import com.example.myfirstapp.ui.main.MainActivity +import com.example.myfirstapp.R +import com.example.myfirstapp.data.local.SongDatabase +import com.example.myfirstapp.data.entities.Album +import com.example.myfirstapp.data.entities.Like import com.example.myfirstapp.databinding.FragmentAlbumBinding import com.google.android.material.tabs.TabLayoutMediator import com.google.gson.Gson @@ -34,7 +40,10 @@ class AlbumFragment : Fragment() { setOnClickListener(album) binding.albumBackIv.setOnClickListener{ - (context as MainActivity).supportFragmentManager.beginTransaction().replace(R.id.main_container,HomeFragment()).commitAllowingStateLoss() + (context as MainActivity).supportFragmentManager.beginTransaction().replace( + R.id.main_container, + HomeFragment() + ).commitAllowingStateLoss() } val albumVpAdapter = AlbumVpAdapter(this) diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/DetailFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/DetailFragment.kt similarity index 92% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/DetailFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/DetailFragment.kt index dbde467..e702c50 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/DetailFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/DetailFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.album import android.os.Bundle import android.view.LayoutInflater diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/SongFragment.kt similarity index 93% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SongFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/SongFragment.kt index 7b96ee3..b97f8b8 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/SongFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.album import android.os.Bundle import android.view.LayoutInflater diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/VideoFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/VideoFragment.kt similarity index 93% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/VideoFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/VideoFragment.kt index dd264f2..a3dc541 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/VideoFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/album/VideoFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.album import android.os.Bundle import android.view.LayoutInflater diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/BannerFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/home/BannerFragment.kt similarity index 93% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/BannerFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/home/BannerFragment.kt index d8067d9..de09789 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/BannerFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/home/BannerFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.home import android.content.res.Configuration import android.os.Bundle diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/HomeFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/home/HomeFragment.kt similarity index 91% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/HomeFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/home/HomeFragment.kt index 36078b7..8aa9fe1 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/HomeFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/home/HomeFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.home import android.os.Bundle import android.os.Handler @@ -10,7 +10,16 @@ import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.recyclerview.widget.LinearLayoutManager import androidx.viewpager2.widget.ViewPager2 +import com.example.myfirstapp.ui.adapter.AlbumRVAdapter +import com.example.myfirstapp.ui.adapter.BannerVPAdapter +import com.example.myfirstapp.data.remote.CommunicationInterface +import com.example.myfirstapp.ui.main.MainActivity +import com.example.myfirstapp.ui.adapter.PannelVPAdapter +import com.example.myfirstapp.R +import com.example.myfirstapp.data.local.SongDatabase +import com.example.myfirstapp.data.entities.Album import com.example.myfirstapp.databinding.FragmentHomeBinding +import com.example.myfirstapp.ui.main.album.AlbumFragment import com.google.gson.Gson import java.util.Timer import java.util.TimerTask @@ -41,7 +50,7 @@ class HomeFragment : Fragment() , CommunicationInterface { binding.homeTodayAlbumRv.adapter = albumRVAdapter binding.homeTodayAlbumRv.layoutManager = LinearLayoutManager(requireActivity(),LinearLayoutManager.HORIZONTAL,false) - albumRVAdapter.setMyItemClickListener(object: AlbumRVAdapter.MyItemClickListener{ + albumRVAdapter.setMyItemClickListener(object: AlbumRVAdapter.MyItemClickListener { override fun onItemClick(album: Album) { changeAlbumFragment(album) } diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/PannelFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/home/PannelFragment.kt similarity index 94% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/PannelFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/home/PannelFragment.kt index 9d43cae..9dbf0ae 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/PannelFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/home/PannelFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.home import android.os.Bundle import android.view.LayoutInflater diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/LockerFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/LockerFragment.kt similarity index 91% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/LockerFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/LockerFragment.kt index 6cbf112..1479ddf 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/LockerFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/LockerFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.locker import android.content.Intent import android.os.Bundle @@ -7,6 +7,9 @@ import android.view.View import android.view.ViewGroup import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.Fragment +import com.example.myfirstapp.ui.adapter.LockerVPAdapter +import com.example.myfirstapp.ui.signin.LoginActivity +import com.example.myfirstapp.ui.main.MainActivity import com.example.myfirstapp.databinding.FragmentLockerBinding import com.google.android.material.tabs.TabLayoutMediator diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/MusicFileFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/MusicFileFragment.kt similarity index 93% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/MusicFileFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/MusicFileFragment.kt index 6beed45..7237d2d 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/MusicFileFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/MusicFileFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.locker import android.os.Bundle import android.view.LayoutInflater diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SavedAlbumFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/SavedAlbumFragment.kt similarity index 91% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SavedAlbumFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/SavedAlbumFragment.kt index e95fe11..f384fe8 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SavedAlbumFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/SavedAlbumFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.locker import android.os.Bundle import android.util.Log @@ -8,9 +8,10 @@ import android.view.ViewGroup import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.Fragment import androidx.recyclerview.widget.LinearLayoutManager -import com.example.myfirstapp.databinding.FragmentDetailBinding -import com.example.myfirstapp.databinding.FragmentMusicfileBinding +import com.example.myfirstapp.data.local.SongDatabase +import com.example.myfirstapp.data.entities.Album import com.example.myfirstapp.databinding.FragmentSavedalbumBinding +import com.example.myfirstapp.ui.adapter.SavedAlbumRVAdapter class SavedAlbumFragment : Fragment(){ diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SavedSongFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/SavedSongFragment.kt similarity index 87% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SavedSongFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/SavedSongFragment.kt index 2e3f619..2b74079 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SavedSongFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/locker/SavedSongFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.locker import android.os.Bundle import android.view.LayoutInflater @@ -6,10 +6,10 @@ import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.recyclerview.widget.LinearLayoutManager -import com.example.myfirstapp.databinding.FragmentDetailBinding -import com.example.myfirstapp.databinding.FragmentMusicfileBinding +import com.example.myfirstapp.data.local.SongDatabase +import com.example.myfirstapp.data.entities.Song import com.example.myfirstapp.databinding.FragmentSavedsongBinding -import com.google.gson.Gson +import com.example.myfirstapp.ui.adapter.LockerAlbumRVAdapter class SavedSongFragment : Fragment(){ diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/LookFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/look/LookFragment.kt similarity index 85% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/LookFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/look/LookFragment.kt index e70598e..d64fe9a 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/LookFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/look/LookFragment.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.look import android.os.Bundle import android.util.Log @@ -6,6 +6,10 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment +import com.example.myfirstapp.data.remote.FloChartResult +import com.example.myfirstapp.data.local.SongDatabase +import com.example.myfirstapp.ui.adapter.SongRVAdapter +import com.example.myfirstapp.data.remote.SongService import com.example.myfirstapp.databinding.FragmentLookBinding class LookFragment : Fragment(), LookView { diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/LookView.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/look/LookView.kt similarity index 61% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/LookView.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/look/LookView.kt index 8266579..346d988 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/LookView.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/look/LookView.kt @@ -1,4 +1,6 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.look + +import com.example.myfirstapp.data.remote.FloChartResult interface LookView { fun onGetSongLoading() diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SearchFragment.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/search/SearchFragment.kt similarity index 87% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SearchFragment.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/search/SearchFragment.kt index 815c5bd..1c4bcda 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SearchFragment.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/main/search/SearchFragment.kt @@ -1,10 +1,11 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.main.search import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment +import com.example.myfirstapp.R class SearchFragment : Fragment() { // 여기에 Fragment의 구현 내용을 작성합니다. diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/LoginActivity.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/signin/LoginActivity.kt similarity index 87% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/LoginActivity.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/signin/LoginActivity.kt index fa776a3..7b4cffe 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/LoginActivity.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/signin/LoginActivity.kt @@ -1,11 +1,15 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.signin import android.content.Intent import android.os.Bundle -import android.util.Log import android.widget.Toast import androidx.appcompat.app.AppCompatActivity +import com.example.myfirstapp.data.remote.Result +import com.example.myfirstapp.ui.singup.SignUpActivity +import com.example.myfirstapp.data.entities.User +import com.example.myfirstapp.data.remote.AuthService import com.example.myfirstapp.databinding.ActivityLoginBinding +import com.example.myfirstapp.ui.main.MainActivity class LoginActivity : AppCompatActivity(), LoginView { diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/LoginView.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/signin/LoginView.kt similarity index 56% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/LoginView.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/signin/LoginView.kt index 2f250b9..e46060c 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/LoginView.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/signin/LoginView.kt @@ -1,4 +1,6 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.signin + +import com.example.myfirstapp.data.remote.Result interface LoginView { fun onLoginSuccess(code : Int, result : Result) diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SignUpActivity.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/singup/SignUpActivity.kt similarity index 93% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SignUpActivity.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/singup/SignUpActivity.kt index bfa5cd8..b3e4baf 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SignUpActivity.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/singup/SignUpActivity.kt @@ -1,14 +1,12 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.singup import android.os.Bundle -import android.util.Log import android.view.View import android.widget.Toast import androidx.appcompat.app.AppCompatActivity +import com.example.myfirstapp.data.entities.User +import com.example.myfirstapp.data.remote.AuthService import com.example.myfirstapp.databinding.ActivitySignUpBinding -import retrofit2.Call -import retrofit2.Callback -import retrofit2.Response class SignUpActivity : AppCompatActivity(), SignUpView { diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SignUpView.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/singup/SignUpView.kt similarity index 69% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SignUpView.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/singup/SignUpView.kt index 350356a..7c347ac 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SignUpView.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/singup/SignUpView.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.singup interface SignUpView { fun onSignUpSuccess() diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongActivity.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/song/SongActivity.kt similarity index 96% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/SongActivity.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/ui/song/SongActivity.kt index 72ba09d..ac00af0 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/SongActivity.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/ui/song/SongActivity.kt @@ -1,15 +1,15 @@ -package com.example.myfirstapp +package com.example.myfirstapp.ui.song -import android.content.Intent import android.media.MediaPlayer import android.os.Bundle import android.util.Log import android.view.View -import android.widget.Toast import androidx.appcompat.app.AppCompatActivity -import androidx.core.content.ContextCompat +import com.example.myfirstapp.utils.CustomSnackbar +import com.example.myfirstapp.R +import com.example.myfirstapp.data.local.SongDatabase +import com.example.myfirstapp.data.entities.Song import com.example.myfirstapp.databinding.ActivitySongBinding -import com.google.gson.Gson class SongActivity : AppCompatActivity() { diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/Constant.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/utils/Constant.kt similarity index 72% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/Constant.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/utils/Constant.kt index 0faa071..6382fca 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/Constant.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/utils/Constant.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.utils object Constant { const val CHANNEL_ID = "ch123" diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/CustomSnackbar.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/utils/CustomSnackbar.kt similarity index 95% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/CustomSnackbar.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/utils/CustomSnackbar.kt index 8cdb8b1..b8255b4 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/CustomSnackbar.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/utils/CustomSnackbar.kt @@ -1,9 +1,10 @@ -package com.example.myfirstapp +package com.example.myfirstapp.utils import android.view.LayoutInflater import android.view.View import androidx.core.content.ContextCompat import androidx.databinding.DataBindingUtil +import com.example.myfirstapp.R import com.example.myfirstapp.databinding.CustomSnackbarBinding import com.google.android.material.snackbar.Snackbar diff --git a/UMC_6th/app/src/main/java/com/example/myfirstapp/ForegroundService.kt b/UMC_6th/app/src/main/java/com/example/myfirstapp/utils/ForegroundService.kt similarity index 95% rename from UMC_6th/app/src/main/java/com/example/myfirstapp/ForegroundService.kt rename to UMC_6th/app/src/main/java/com/example/myfirstapp/utils/ForegroundService.kt index a8071a0..7a9087b 100644 --- a/UMC_6th/app/src/main/java/com/example/myfirstapp/ForegroundService.kt +++ b/UMC_6th/app/src/main/java/com/example/myfirstapp/utils/ForegroundService.kt @@ -1,4 +1,4 @@ -package com.example.myfirstapp +package com.example.myfirstapp.utils import android.app.Notification import android.app.NotificationChannel @@ -9,6 +9,7 @@ import android.content.Intent import android.os.Build import android.os.IBinder import androidx.annotation.RequiresApi +import com.example.myfirstapp.ui.song.SongActivity class ForegroundService : Service() { diff --git a/UMC_6th/app/src/main/res/layout/activity_main.xml b/UMC_6th/app/src/main/res/layout/activity_main.xml index 6b03c8e..d95f036 100644 --- a/UMC_6th/app/src/main/res/layout/activity_main.xml +++ b/UMC_6th/app/src/main/res/layout/activity_main.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".MainActivity"> + tools:context=".ui.main.MainActivity"> + tools:context=".ui.main.album.AlbumFragment"> + tools:context=".ui.main.home.HomeFragment">