diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index e4b6d6d..98d7ca3 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -131,11 +131,15 @@
-
+
-
-
-
+
+
+
+
+
+
+
@@ -198,7 +202,7 @@
@@ -230,7 +234,7 @@
-
+
{
"associatedIndex": 4
@@ -243,29 +247,29 @@
- {
- "keyToString": {
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.cidr.known.project.marker": "true",
- "SHARE_PROJECT_CONFIGURATION_FILES": "true",
- "cf.first.check.clang-format": "false",
- "cidr.known.project.marker": "true",
- "git-widget-placeholder": "maro/#43",
- "ignore.virus.scanning.warn.message": "true",
- "last_opened_file_path": "C:/android/MARO_HW1/UMC_6th/app/src/main/java/com/example/umc_6th",
- "project.structure.last.edited": "Modules",
- "project.structure.proportion": "0.17",
- "project.structure.side.proportion": "0.2",
- "settings.editor.selected.configurable": "reference.settingsdialog.project.gradle"
+
+}]]>
@@ -273,12 +277,20 @@
+
+
+
+
+
+
+
+
@@ -909,7 +921,23 @@
1718708640991
-
+
+
+ 1719237181690
+
+
+
+ 1719237181690
+
+
+
+ 1719238543674
+
+
+
+ 1719238543674
+
+
@@ -934,7 +962,6 @@
-
@@ -959,6 +986,7 @@
-
+
+
\ No newline at end of file
diff --git a/UMC_6th/app/build.gradle.kts b/UMC_6th/app/build.gradle.kts
index f1f6d04..0d9d219 100644
--- a/UMC_6th/app/build.gradle.kts
+++ b/UMC_6th/app/build.gradle.kts
@@ -4,6 +4,8 @@ plugins {
id("kotlin-kapt")
}
+
+
android {
namespace = "com.example.umc_6th"
compileSdk = 34
@@ -16,6 +18,7 @@ android {
dataBinding = true
}
+
defaultConfig {
applicationId = "com.example.umc_6th"
minSdk = 24
@@ -43,9 +46,11 @@ android {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
+
}
dependencies {
+ implementation("com.kakao.sdk:v2-user:2.12.1")
implementation("com.google.android.material:material:1.10.0")
implementation("androidx.room:room-migration:2.6.0")
implementation("androidx.room:room-runtime:2.6.0")
diff --git a/UMC_6th/app/src/main/AndroidManifest.xml b/UMC_6th/app/src/main/AndroidManifest.xml
index bbdf0a0..2143b63 100644
--- a/UMC_6th/app/src/main/AndroidManifest.xml
+++ b/UMC_6th/app/src/main/AndroidManifest.xml
@@ -8,6 +8,7 @@
+
-
-
+
+
+
@@ -32,7 +37,7 @@
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/GlobalApplication.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/GlobalApplication.kt
new file mode 100644
index 0000000..4113f23
--- /dev/null
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/GlobalApplication.kt
@@ -0,0 +1,13 @@
+package com.example.umc_6th
+
+import android.app.Application
+import com.kakao.sdk.common.KakaoSdk
+
+class GlobalApplication : Application() {
+ override fun onCreate() {
+ super.onCreate()
+
+ // Kakao Sdk 초기화
+ KakaoSdk.init(this, "9869def2f21ef97ba7f905ec34960cbb")
+ }
+}
\ No newline at end of file
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/LoginActivity.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/LoginActivity.kt
deleted file mode 100644
index 485741a..0000000
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/LoginActivity.kt
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.chrome.umcflo
-import com.example.umc_6th.Result
-
-import android.content.Intent
-import androidx.appcompat.app.AppCompatActivity
-import android.os.Bundle
-import android.widget.Toast
-import com.example.umc_6th.LoginView
-import com.example.umc_6th.MainActivity
-import com.example.umc_6th.User
-import com.example.umc_6th.databinding.ActivityLoginBinding
-
-
-class LoginActivity : AppCompatActivity(), LoginView {
-
- lateinit var binding : ActivityLoginBinding
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- binding = ActivityLoginBinding.inflate(layoutInflater)
- setContentView(binding.root)
-
- binding.loginSignUpTv.setOnClickListener {
- val intent = Intent(this, SignUpActivity::class.java)
- startActivity(intent)
- }
-
- binding.loginSignInBtn.setOnClickListener {
- login()
- }
- }
-
- private fun login() {
- if (binding.loginIdEt.text.toString().isEmpty() || binding.loginDirectInputEt.text.toString().isEmpty()) {
- Toast.makeText(this, "이메일을 입력해주세요", Toast.LENGTH_SHORT).show()
- return
- }
-
- if (binding.loginPasswordEt.text.toString().isEmpty()) {
- Toast.makeText(this, "비밀번호를 입력해주세요", Toast.LENGTH_SHORT).show()
- return
- }
-
- val email : String = binding.loginIdEt.text.toString() + "@" + binding.loginDirectInputEt.text.toString()
- val pwd : String = binding.loginPasswordEt.text.toString()
-
-// val songDB = SongDatabase.getInstance(this)!!
-// val user = songDB.userDao().getUser(email, pwd)
-//
-// if (user != null) {
-// Log.d("LoginActivity", user.id.toString())
-// saveJwt(user.id)
-// startMainActivity()
-// } else {
-// Toast.makeText(this, "회원 정보가 존재하지 않습니다", Toast.LENGTH_SHORT).show()
-// }
-
- val authService = AuthService()
- authService.setLoginView(this)
-
- authService.login(User(email, pwd, ""))
- }
-
- private fun saveJwt(jwt : Int) {
- val spf = getSharedPreferences("auth", MODE_PRIVATE)
- val editor = spf.edit()
-
- editor.putInt("jwt", jwt)
- editor.apply()
- }
-
- private fun saveJwtFromServer(jwt : String) {
- val spf = getSharedPreferences("auth2", MODE_PRIVATE)
- val editor = spf.edit()
-
- editor.putString("jwt", jwt)
- editor.apply()
- }
-
- private fun startMainActivity() {
- val intent = Intent(this, MainActivity::class.java)
- startActivity(intent)
- }
-
- override fun onLoginSuccess(code : Int, result: Result) {
- saveJwtFromServer(result.jwt)
- startMainActivity()
- }
-
- override fun onLoginFailure(message : String) {
- Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
- }
-}
\ No newline at end of file
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumRVAdapter.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/adapters/AlbumRVAdapter.kt
similarity index 91%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/AlbumRVAdapter.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/adapters/AlbumRVAdapter.kt
index 7cf898e..904ed40 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumRVAdapter.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/adapters/AlbumRVAdapter.kt
@@ -1,9 +1,10 @@
-package com.example.umc_6th
+package com.example.umc_6th.adapters
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.example.umc_6th.databinding.ItemAlbumBinding
+import com.example.umc_6th.music.Album
class AlbumRVAdapter(private val albumList:ArrayList) : RecyclerView.Adapter() {
@@ -32,13 +33,13 @@ class AlbumRVAdapter(private val albumList:ArrayList) : RecyclerView.Adap
notifyDataSetChanged()
}
- override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): AlbumRVAdapter.ViewHolder {
+ override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ViewHolder {
val binding: ItemAlbumBinding = ItemAlbumBinding.inflate(LayoutInflater.from(viewGroup.context),viewGroup,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{
mItemClickListener.onItemClick(albumList[position]) }
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumVPAdapter.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/adapters/AlbumVPAdapter.kt
similarity index 70%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/AlbumVPAdapter.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/adapters/AlbumVPAdapter.kt
index c49f688..eb1c167 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumVPAdapter.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/adapters/AlbumVPAdapter.kt
@@ -1,7 +1,10 @@
-package com.example.umc_6th
+package com.example.umc_6th.adapters
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
+import com.example.umc_6th.music.SongFragment
+import com.example.umc_6th.ui.DetailFragment
+import com.example.umc_6th.ui.VideoFragment
class AlbumVPAdapter(fragment:Fragment) : FragmentStateAdapter(fragment){
override fun getItemCount(): Int = 3
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/BannerVPAdapter.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/adapters/BannerVPAdapter.kt
similarity index 93%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/BannerVPAdapter.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/adapters/BannerVPAdapter.kt
index c0cd727..7e636d8 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/BannerVPAdapter.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/adapters/BannerVPAdapter.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.adapters
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/LockerAlbumRVAdapter.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/adapters/LockerAlbumRVAdapter.kt
similarity index 91%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/LockerAlbumRVAdapter.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/adapters/LockerAlbumRVAdapter.kt
index b88a30d..0c8e470 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/LockerAlbumRVAdapter.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/adapters/LockerAlbumRVAdapter.kt
@@ -1,12 +1,12 @@
-package com.example.umc_6th
+package com.example.umc_6th.adapters
import android.annotation.SuppressLint
import android.util.SparseBooleanArray
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
-import androidx.recyclerview.widget.RecyclerView.Recycler
import com.example.umc_6th.databinding.ItemLockerAlbumBinding
+import com.example.umc_6th.music.Song
class LockerAlbumRVAdapter () : RecyclerView.Adapter(){
@@ -16,14 +16,14 @@ class LockerAlbumRVAdapter () : RecyclerView.Adapter() {
private val albums = ArrayList()
@@ -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/umc_6th/AuthApi.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/AuthApi.kt
similarity index 68%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/AuthApi.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/auth/AuthApi.kt
index 61ba302..bc6198e 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/AuthApi.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/AuthApi.kt
@@ -1,5 +1,7 @@
-package com.example.umc_6th
+package com.example.umc_6th.auth
+import com.example.umc_6th.models.BaseResponse
+import com.example.umc_6th.models.User
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.POST
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/AuthService.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/AuthService.kt
similarity index 89%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/AuthService.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/auth/AuthService.kt
index 759fb33..35f5382 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/AuthService.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/AuthService.kt
@@ -1,11 +1,9 @@
-package com.chrome.umcflo
+package com.example.umc_6th.auth
import android.util.Log
-import com.example.umc_6th.BaseResponse
-import com.example.umc_6th.LoginView
-import com.example.umc_6th.RetrofitInstance
-import com.example.umc_6th.SignUpView
-import com.example.umc_6th.User
+import com.example.umc_6th.models.BaseResponse
+import com.example.umc_6th.util.RetrofitInstance
+import com.example.umc_6th.models.User
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/auth/LoginActivity.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/LoginActivity.kt
new file mode 100644
index 0000000..002320f
--- /dev/null
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/LoginActivity.kt
@@ -0,0 +1,77 @@
+package com.example.yourapp
+
+import android.content.Intent
+import android.os.Bundle
+import android.util.Log
+import android.widget.ImageView
+import android.widget.Toast
+import androidx.appcompat.app.AppCompatActivity
+import com.example.umc_6th.auth.SignUpActivity
+import com.example.umc_6th.databinding.ActivityLoginBinding
+import com.example.umc_6th.ui.MainActivity
+import com.kakao.sdk.auth.model.OAuthToken
+import com.kakao.sdk.user.UserApiClient
+
+class LoginActivity : AppCompatActivity() {
+
+ lateinit var binding: ActivityLoginBinding
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivityLoginBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+
+ // 기존 로그인 버튼 클릭 이벤트
+ binding.loginSignInBtn.setOnClickListener {
+ login()
+ }
+
+ // 회원가입 버튼 클릭 이벤트
+ binding.loginSignUpTv.setOnClickListener {
+ startActivity(Intent(this, SignUpActivity::class.java))
+ }
+
+ // 카카오 로그인 버튼 클릭 이벤트
+ binding.loginKakakoLoginIv.setOnClickListener {
+ loginWithKakao()
+ }
+ }
+
+ private fun login() {
+ // 기존 로그인 로직
+ if (binding.loginIdEt.text.toString().isEmpty() || binding.loginPasswordEt.text.toString().isEmpty()) {
+ Toast.makeText(this, "이메일과 비밀번호를 입력해주세요", Toast.LENGTH_SHORT).show()
+ return
+ }
+
+ // 로그인 검증 로직, 서버 통신 등
+ // 로그인 성공 후 메인 액티비티로 이동 예시
+ startActivity(Intent(this, MainActivity::class.java))
+ finish()
+ }
+
+ private fun loginWithKakao() {
+ if (UserApiClient.instance.isKakaoTalkLoginAvailable(this)) {
+ UserApiClient.instance.loginWithKakaoTalk(this) { token, error ->
+ handleLoginResult(token, error)
+ }
+ } else {
+ UserApiClient.instance.loginWithKakaoAccount(this) { token, error ->
+ handleLoginResult(token, error)
+ }
+ }
+ }
+
+ private fun handleLoginResult(token: OAuthToken?, error: Throwable?) {
+ if (error != null) {
+ Log.e("LoginActivity", "카카오 로그인 실패", error)
+ Toast.makeText(this, "로그인 실패: ${error.localizedMessage}", Toast.LENGTH_SHORT).show()
+ } else if (token != null) {
+ Log.i("LoginActivity", "카카오 로그인 성공 ${token.accessToken}")
+ Toast.makeText(this, "로그인 성공", Toast.LENGTH_SHORT).show()
+ // 로그인 성공 시 MainActivity로 이동
+ startActivity(Intent(this, MainActivity::class.java))
+ finish()
+ }
+ }
+}
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/LoginView.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/LoginView.kt
similarity index 60%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/LoginView.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/auth/LoginView.kt
index ec0c20f..1d6d406 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/LoginView.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/LoginView.kt
@@ -1,4 +1,6 @@
-package com.example.umc_6th
+package com.example.umc_6th.auth
+
+import com.example.umc_6th.models.Result
interface LoginView {
fun onLoginSuccess(code : Int, result : Result)
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/LookView.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/LookView.kt
similarity index 66%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/LookView.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/auth/LookView.kt
index cca1f81..a701cb0 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/LookView.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/LookView.kt
@@ -1,4 +1,6 @@
-package com.example.umc_6th
+package com.example.umc_6th.auth
+
+import com.example.umc_6th.models.FloChartResult
interface LookView {
fun onGetSongLoading()
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SignUpActivity.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/SignUpActivity.kt
similarity index 94%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SignUpActivity.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/auth/SignUpActivity.kt
index 1a583df..262fa2f 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SignUpActivity.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/SignUpActivity.kt
@@ -1,12 +1,10 @@
-package com.chrome.umcflo
+package com.example.umc_6th.auth
import android.os.Bundle
-import android.util.Log
import android.view.View
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
-import com.example.umc_6th.SignUpView
-import com.example.umc_6th.User
+import com.example.umc_6th.models.User
import com.example.umc_6th.databinding.ActivitySignUpBinding
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SignUpView.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/SignUpView.kt
similarity index 73%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SignUpView.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/auth/SignUpView.kt
index 1d08efc..63e92ba 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SignUpView.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/auth/SignUpView.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.auth
interface SignUpView {
fun onSignUpSuccess()
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumDao.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/database/AlbumDao.kt
similarity index 89%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/AlbumDao.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/database/AlbumDao.kt
index ae8a876..62780bc 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumDao.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/database/AlbumDao.kt
@@ -1,11 +1,13 @@
-package com.example.umc_6th
+package com.example.umc_6th.database
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
+import com.example.umc_6th.models.Like
+import com.example.umc_6th.music.Album
@Dao
interface AlbumDao {
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/ApiRepository.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/database/ApiRepository.kt
similarity index 76%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/ApiRepository.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/database/ApiRepository.kt
index 24ea8aa..c3c8157 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/ApiRepository.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/database/ApiRepository.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.database
class ApiRepository {
companion object {
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SongApi.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/database/SongApi.kt
similarity index 60%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SongApi.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/database/SongApi.kt
index 7ee8b5b..7984631 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SongApi.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/database/SongApi.kt
@@ -1,5 +1,6 @@
-package com.example.umc_6th
+package com.example.umc_6th.database
+import com.example.umc_6th.models.SongResponse
import retrofit2.http.GET
import retrofit2.Call
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SongDao.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/database/SongDao.kt
similarity index 89%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SongDao.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/database/SongDao.kt
index 393c763..0df4856 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SongDao.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/database/SongDao.kt
@@ -1,10 +1,11 @@
-package com.example.umc_6th
+package com.example.umc_6th.database
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
+import com.example.umc_6th.music.Song
@Dao
interface SongDao {
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SongDatabase.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/database/SongDatabase.kt
similarity index 83%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SongDatabase.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/database/SongDatabase.kt
index b8dd7ba..aed665b 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SongDatabase.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/database/SongDatabase.kt
@@ -1,9 +1,13 @@
-package com.example.umc_6th
+package com.example.umc_6th.database
import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
+import com.example.umc_6th.models.Like
+import com.example.umc_6th.models.User
+import com.example.umc_6th.music.Album
+import com.example.umc_6th.music.Song
@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/umc_6th/SongService.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/database/SongService.kt
similarity index 87%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SongService.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/database/SongService.kt
index bbf0970..b6904b1 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SongService.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/database/SongService.kt
@@ -1,6 +1,9 @@
-package com.example.umc_6th
+package com.example.umc_6th.database
import android.util.Log
+import com.example.umc_6th.auth.LookView
+import com.example.umc_6th.util.RetrofitInstance
+import com.example.umc_6th.models.SongResponse
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/UserDao.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/database/UserDao.kt
similarity index 82%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/UserDao.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/database/UserDao.kt
index 8f6b77b..b03863c 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/UserDao.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/database/UserDao.kt
@@ -1,8 +1,9 @@
-package com.example.umc_6th
+package com.example.umc_6th.database
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
+import com.example.umc_6th.models.User
@Dao
interface UserDao {
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/BaseResponse.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/models/BaseResponse.kt
similarity index 91%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/BaseResponse.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/models/BaseResponse.kt
index b538198..36ddde5 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/BaseResponse.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/models/BaseResponse.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.models
import com.google.gson.annotations.SerializedName
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/Like.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/models/Like.kt
similarity index 86%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/Like.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/models/Like.kt
index 54721b2..4a48e39 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/Like.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/models/Like.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.models
import androidx.room.Entity
import androidx.room.PrimaryKey
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SongResponnse.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/models/SongResponnse.kt
similarity index 94%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SongResponnse.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/models/SongResponnse.kt
index 6f382a2..b35c100 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SongResponnse.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/models/SongResponnse.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.models
import com.google.gson.annotations.SerializedName
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/User.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/models/User.kt
similarity index 91%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/User.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/models/User.kt
index e308bf2..0bdd41d 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/User.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/models/User.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.models
import androidx.room.Entity
import androidx.room.PrimaryKey
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/Album.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/music/Album.kt
similarity index 90%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/Album.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/music/Album.kt
index 9c492df..2d9610c 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/Album.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/music/Album.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.music
import androidx.room.Entity
import androidx.room.PrimaryKey
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/music/AlbumFragment.kt
similarity index 91%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/AlbumFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/music/AlbumFragment.kt
index 15e63bd..0484c24 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/music/AlbumFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.music
import android.os.Bundle
import android.view.LayoutInflater
@@ -7,8 +7,14 @@ import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.fragment.app.setFragmentResultListener
+import com.example.umc_6th.adapters.AlbumVPAdapter
+import com.example.umc_6th.models.Like
+import com.example.umc_6th.R
+import com.example.umc_6th.database.SongDatabase
import com.example.umc_6th.databinding.FragmentAlbumBinding
import com.example.umc_6th.databinding.FragmentAlbumBinding.inflate
+import com.example.umc_6th.ui.HomeFragment
+import com.example.umc_6th.ui.MainActivity
import com.google.android.material.tabs.TabLayoutMediator
import com.google.gson.Gson
@@ -34,7 +40,7 @@ class AlbumFragment : Fragment() {
binding.albumBackIv.setOnClickListener{
(context as MainActivity).supportFragmentManager.beginTransaction().
- replace(R.id.main_frm,HomeFragment()).
+ replace(R.id.main_frm, HomeFragment()).
commitAllowingStateLoss()
}
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/MusicFileFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/music/MusicFileFragment.kt
similarity index 94%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/MusicFileFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/music/MusicFileFragment.kt
index b4958e4..74b7d19 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/MusicFileFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/music/MusicFileFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.music
import android.os.Bundle
import androidx.fragment.app.Fragment
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/Song.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/music/Song.kt
similarity index 92%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/Song.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/music/Song.kt
index 9beb49b..1582238 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/Song.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/music/Song.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.music
import androidx.room.Entity
import androidx.room.PrimaryKey
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SongActivity.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/music/SongActivity.kt
similarity index 96%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SongActivity.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/music/SongActivity.kt
index b58c678..c1dd0de 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SongActivity.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/music/SongActivity.kt
@@ -1,18 +1,19 @@
-package com.example.umc_6th
+package com.example.umc_6th.music
import android.app.ActivityManager
import android.content.Context
import android.content.Intent
import android.media.MediaPlayer
-import android.nfc.Tag
import android.os.Bundle
import android.util.Log
import android.view.View
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
+import com.example.umc_6th.util.CustomSnackbar
+import com.example.umc_6th.util.ForegroundService
+import com.example.umc_6th.R
+import com.example.umc_6th.database.SongDatabase
import com.example.umc_6th.databinding.ActivitySongBinding
-import com.google.gson.Gson
-import java.util.Timer
class SongActivity : AppCompatActivity() {
@@ -74,7 +75,7 @@ class SongActivity : AppCompatActivity() {
private fun startStopService() {
if(isServiceRunning(ForegroundService::class.java)){
Toast.makeText(this, "Foreground Service Stopped",Toast.LENGTH_SHORT).show()
- stopService(Intent(this,ForegroundService::class.java))
+ stopService(Intent(this, ForegroundService::class.java))
} else{
Toast.makeText(this, "Foreground Service Started", Toast.LENGTH_SHORT).show()
startService(Intent(this, ForegroundService::class.java))
@@ -183,7 +184,7 @@ class SongActivity : AppCompatActivity() {
// Toast.makeText(this,"first song", Toast.LENGTH_SHORT).show()
}
else if(nowPos + direct >= songs.size){
- CustomSnackbar.make(binding.root,"마지막 곡입니다.").show()
+ CustomSnackbar.make(binding.root, "마지막 곡입니다.").show()
// Toast.makeText(this,"last song",Toast.LENGTH_SHORT).show()
}
else {
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SongFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/music/SongFragment.kt
similarity index 94%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SongFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/music/SongFragment.kt
index 19ed101..585d995 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SongFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/music/SongFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.music
import android.os.Bundle
import android.view.LayoutInflater
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/BannerFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/BannerFragment.kt
similarity index 95%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/BannerFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/BannerFragment.kt
index 3f8f6ba..437eeb6 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/BannerFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/BannerFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
import android.os.Bundle
import androidx.fragment.app.Fragment
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/DetailFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/DetailFragment.kt
similarity index 94%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/DetailFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/DetailFragment.kt
index cf784c9..e3c8f37 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/DetailFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/DetailFragment.kt
@@ -1,5 +1,5 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
import android.os.Bundle
import android.view.LayoutInflater
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/HomeFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/HomeFragment.kt
similarity index 93%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/HomeFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/HomeFragment.kt
index c3c0cbd..6d734d4 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/HomeFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/HomeFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
import android.os.Bundle
import android.os.Handler
@@ -8,10 +8,15 @@ import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import androidx.core.os.bundleOf
-import androidx.fragment.app.setFragmentResult
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.viewpager2.widget.ViewPager2
+import com.example.umc_6th.music.Album
+import com.example.umc_6th.music.AlbumFragment
+import com.example.umc_6th.adapters.AlbumRVAdapter
+import com.example.umc_6th.adapters.BannerVPAdapter
+import com.example.umc_6th.adapters.PannelVPAdapter
+import com.example.umc_6th.R
+import com.example.umc_6th.database.SongDatabase
import com.example.umc_6th.databinding.FragmentHomeBinding
import com.google.gson.Gson
import java.util.ArrayList
@@ -58,7 +63,7 @@ class HomeFragment : Fragment(), AlbumRVAdapter.CommunicationInterface {
binding.homeTodayMusicAlbumRv.adapter = albumRVAdapter
binding.homeTodayMusicAlbumRv.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/umc_6th/LockerFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/LockerFragment.kt
similarity index 93%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/LockerFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/LockerFragment.kt
index 17767e3..eb7d771 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/LockerFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/LockerFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
import android.content.Intent
import android.os.Bundle
@@ -7,8 +7,10 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
-import com.chrome.umcflo.LoginActivity
+import com.example.umc_6th.adapters.LockerVPAdapter
import com.example.umc_6th.databinding.FragmentLockerBinding
+import com.example.umc_6th.util.BottomSheetFragment
+import com.example.yourapp.LoginActivity
import com.google.android.material.tabs.TabLayoutMediator
class LockerFragment : Fragment() {
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/LookFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/LookFragment.kt
similarity index 85%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/LookFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/LookFragment.kt
index 917d036..34a2e2b 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/LookFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/LookFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
import android.os.Bundle
import android.util.Log
@@ -6,12 +6,14 @@ import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import android.widget.Button
-import android.widget.ScrollView
-import android.widget.TextView
-import androidx.recyclerview.widget.LinearLayoutManager
+import com.example.umc_6th.models.FloChartResult
+import com.example.umc_6th.auth.LookView
+import com.example.umc_6th.database.SongDatabase
+import com.example.umc_6th.adapters.SongRVAdapter
+import com.example.umc_6th.database.SongService
import com.example.umc_6th.databinding.FragmentLookBinding
+
class LookFragment : Fragment(), LookView {
lateinit var binding: FragmentLookBinding
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/MainActivity.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/MainActivity.kt
similarity index 96%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/MainActivity.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/MainActivity.kt
index 86f782b..e6a1850 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/MainActivity.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/MainActivity.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
import androidx.appcompat.app.AppCompatActivity
import android.content.Intent
@@ -7,6 +7,11 @@ import android.util.Log
import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
+import com.example.umc_6th.music.Album
+import com.example.umc_6th.R
+import com.example.umc_6th.music.Song
+import com.example.umc_6th.music.SongActivity
+import com.example.umc_6th.database.SongDatabase
import com.example.umc_6th.databinding.ActivityMainBinding
import com.google.gson.Gson
@@ -56,7 +61,7 @@ class MainActivity : AppCompatActivity() {
editor.putInt("songId", song.id)
editor.apply()
- val intent = Intent(this,SongActivity::class.java)
+ val intent = Intent(this, SongActivity::class.java)
startActivity(intent)
activityResultLauncher.launch(intent)
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/PannelFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/PannelFragment.kt
similarity index 95%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/PannelFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/PannelFragment.kt
index c75739a..a029850 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/PannelFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/PannelFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
import android.os.Bundle
import androidx.fragment.app.Fragment
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SavedAlbumFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/SavedAlbumFragment.kt
similarity index 93%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SavedAlbumFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/SavedAlbumFragment.kt
index b9c8886..7c1f20e 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SavedAlbumFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/SavedAlbumFragment.kt
@@ -1,4 +1,4 @@
-package com.example.myfirstapp
+package com.example.umc_6th.ui
import android.os.Bundle
import android.util.Log
@@ -8,8 +8,8 @@ import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
-import com.example.umc_6th.SavedAlbumRVAdapter
-import com.example.umc_6th.SongDatabase
+import com.example.umc_6th.adapters.SavedAlbumRVAdapter
+import com.example.umc_6th.database.SongDatabase
import com.example.umc_6th.databinding.FragmentSavedAlbumBinding
class SavedAlbumFragment : Fragment() {
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SavedSongFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/SavedSongFragment.kt
similarity index 89%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SavedSongFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/SavedSongFragment.kt
index 8e6226e..5b7317b 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SavedSongFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/SavedSongFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
import android.os.Bundle
import android.view.LayoutInflater
@@ -6,8 +6,10 @@ import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
+import com.example.umc_6th.adapters.LockerAlbumRVAdapter
+import com.example.umc_6th.database.SongDatabase
import com.example.umc_6th.databinding.FragmentSavedSongBinding
-import com.google.gson.Gson
+import com.example.umc_6th.music.Song
class SavedSongFragment : Fragment() {
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SearchFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/SearchFragment.kt
similarity index 90%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/SearchFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/SearchFragment.kt
index da55302..ebcbd35 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/SearchFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/SearchFragment.kt
@@ -1,10 +1,11 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
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.R
class SearchFragment : Fragment() {
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/VideoFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/VideoFragment.kt
similarity index 94%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/VideoFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/ui/VideoFragment.kt
index 3f59f78..3799b6e 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/VideoFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/ui/VideoFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.ui
import android.os.Bundle
import androidx.fragment.app.Fragment
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/BottomSheetFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/util/BottomSheetFragment.kt
similarity index 97%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/BottomSheetFragment.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/util/BottomSheetFragment.kt
index a8508e8..93c12df 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/BottomSheetFragment.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/util/BottomSheetFragment.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.util
import android.os.Bundle
import androidx.fragment.app.Fragment
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/Constant.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/util/Constant.kt
similarity index 74%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/Constant.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/util/Constant.kt
index e163275..3244152 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/Constant.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/util/Constant.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.util
object Constant {
const val CHANNEL_ID = "ch123"
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/CustomSnackbar.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/util/CustomSnackbar.kt
similarity index 91%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/CustomSnackbar.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/util/CustomSnackbar.kt
index 6a9962b..55323e7 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/CustomSnackbar.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/util/CustomSnackbar.kt
@@ -1,10 +1,11 @@
-package com.example.umc_6th
+package com.example.umc_6th.util
import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.View
import androidx.core.content.ContextCompat
import androidx.databinding.DataBindingUtil
+import com.example.umc_6th.R
import com.example.umc_6th.databinding.CustomSnackbarBinding
import com.google.android.material.snackbar.Snackbar
@@ -20,7 +21,8 @@ class CustomSnackbar(view: View, private val message: String) {
private val inflater = LayoutInflater.from(context)
- private val snackbarBinding: CustomSnackbarBinding = DataBindingUtil.inflate(inflater,R.layout.custom_snackbar, null, false)
+ private val snackbarBinding: CustomSnackbarBinding = DataBindingUtil.inflate(inflater,
+ R.layout.custom_snackbar, null, false)
init {
initView()
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/ForegroundService.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/util/ForegroundService.kt
similarity index 91%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/ForegroundService.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/util/ForegroundService.kt
index b97e721..20657a1 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/ForegroundService.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/util/ForegroundService.kt
@@ -1,4 +1,4 @@
-package com.example.umc_6th
+package com.example.umc_6th.util
import android.annotation.SuppressLint
import android.app.Notification
@@ -10,6 +10,8 @@ import android.content.Intent
import android.os.Build
import android.os.IBinder
import androidx.annotation.RequiresApi
+import com.example.umc_6th.R
+import com.example.umc_6th.music.SongActivity
class ForegroundService : Service() {
@@ -32,7 +34,7 @@ class ForegroundService : Service() {
@SuppressLint("ForegroundServiceType")
@RequiresApi(Build.VERSION_CODES.O)
private fun showNotification() {
- val notificationIntent = Intent(this,SongActivity::class.java)
+ val notificationIntent = Intent(this, SongActivity::class.java)
val pendingIntent = PendingIntent.getActivity(
this,0,notificationIntent,PendingIntent.FLAG_IMMUTABLE
)
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/RetrofitInstance.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/util/RetrofitInstance.kt
similarity index 74%
rename from UMC_6th/app/src/main/java/com/example/umc_6th/RetrofitInstance.kt
rename to UMC_6th/app/src/main/java/com/example/umc_6th/util/RetrofitInstance.kt
index 2a1d5fb..365c255 100644
--- a/UMC_6th/app/src/main/java/com/example/umc_6th/RetrofitInstance.kt
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/util/RetrofitInstance.kt
@@ -1,5 +1,8 @@
-package com.example.umc_6th
+package com.example.umc_6th.util
+import com.example.umc_6th.auth.AuthApi
+import com.example.umc_6th.database.ApiRepository
+import com.example.umc_6th.database.SongApi
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
diff --git a/UMC_6th/app/src/main/res/layout/activity_login.xml b/UMC_6th/app/src/main/res/layout/activity_login.xml
index 7a3b16f..ba3c8fb 100644
--- a/UMC_6th/app/src/main/res/layout/activity_login.xml
+++ b/UMC_6th/app/src/main/res/layout/activity_login.xml
@@ -272,6 +272,7 @@
android:layout_height="45dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
+ android:onClick="loginWithKakao"
android:src="@drawable/kakako_44" />
diff --git a/UMC_6th/app/src/main/res/layout/fragment_bottom_sheet.xml b/UMC_6th/app/src/main/res/layout/fragment_bottom_sheet.xml
index 72d7354..b648e90 100644
--- a/UMC_6th/app/src/main/res/layout/fragment_bottom_sheet.xml
+++ b/UMC_6th/app/src/main/res/layout/fragment_bottom_sheet.xml
@@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
- tools:context=".BottomSheetFragment"
+ tools:context=".util.BottomSheetFragment"
android:background="@color/select_color">
+ tools:context=".ui.HomeFragment">
+ tools:context=".music.MusicFileFragment">
+ tools:context=".ui.SearchFragment">