From 1f4c3c24db77ff45f5cb447975bc43c2c50f6006 Mon Sep 17 00:00:00 2001
From: BAEK0111 <143854581+BAEK0111@users.noreply.github.com>
Date: Wed, 5 Jun 2024 20:30:18 +0900
Subject: [PATCH] =?UTF-8?q?[Simba/#38]=20feat=20::=208=EC=A3=BC=EC=B0=A8?=
=?UTF-8?q?=20=EC=99=84=EB=A3=8C=20(#42)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* [simba/#38] feat:: 회원가입, 로그인 구현
* [simba/#38] feat:: 회원가입, 로그인 구현2
* [simba/#38] feat:: 회원가입, 로그인 구현2
* [simba/#38] feat:: 특정 위치로 스크롤하기
---
UMC_6th/app/src/main/AndroidManifest.xml | 3 +
.../main/java/com/example/umc_6th/AlbumDao.kt | 12 +
.../java/com/example/umc_6th/AlbumFragment.kt | 49 +++
.../src/main/java/com/example/umc_6th/Like.kt | 12 +
.../example/umc_6th/LockerAlbumRVAdapter.kt | 10 +-
.../com/example/umc_6th/LockerFragment.kt | 39 +++
.../java/com/example/umc_6th/LoginActivity.kt | 65 ++++
.../java/com/example/umc_6th/LookFragment.kt | 102 +++++-
.../java/com/example/umc_6th/MainActivity.kt | 10 +-
.../com/example/umc_6th/SavedAlbumFragment.kt | 35 ++
.../example/umc_6th/SavedAlbumRVAdapter.kt | 60 ++++
.../com/example/umc_6th/SignUpActivity.kt | 49 +++
.../java/com/example/umc_6th/SongActivity.kt | 14 +-
.../java/com/example/umc_6th/SongDatabase.kt | 4 +-
.../src/main/java/com/example/umc_6th/User.kt | 12 +
.../main/java/com/example/umc_6th/UserDao.kt | 17 +
.../main/res/drawable/not_selected_button.xml | 6 +
.../src/main/res/drawable/selected_button.xml | 6 +
.../src/main/res/layout/activity_login.xml | 319 ++++++++++++++++++
.../src/main/res/layout/activity_signup.xml | 223 ++++++++++++
.../res/layout/fragment_locker_savedalbum.xml | 23 +-
.../app/src/main/res/layout/fragment_look.xml | 290 +++++++++++++++-
22 files changed, 1324 insertions(+), 36 deletions(-)
create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/Like.kt
create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/LoginActivity.kt
create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/SavedAlbumRVAdapter.kt
create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/SignUpActivity.kt
create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/User.kt
create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/UserDao.kt
create mode 100644 UMC_6th/app/src/main/res/drawable/not_selected_button.xml
create mode 100644 UMC_6th/app/src/main/res/drawable/selected_button.xml
create mode 100644 UMC_6th/app/src/main/res/layout/activity_login.xml
create mode 100644 UMC_6th/app/src/main/res/layout/activity_signup.xml
diff --git a/UMC_6th/app/src/main/AndroidManifest.xml b/UMC_6th/app/src/main/AndroidManifest.xml
index 13e6aad..e996aa9 100644
--- a/UMC_6th/app/src/main/AndroidManifest.xml
+++ b/UMC_6th/app/src/main/AndroidManifest.xml
@@ -21,6 +21,9 @@
android:enabled="true"
android:exported="true">
+
+
+
+
}
\ No newline at end of file
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/AlbumFragment.kt
index 979ab75..48daa6a 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/AlbumFragment.kt
@@ -5,6 +5,7 @@ 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 androidx.fragment.app.setFragmentResultListener
import com.example.umc_6th.databinding.FragmentAlbumBinding
@@ -18,7 +19,9 @@ class AlbumFragment : Fragment() {
lateinit var binding : FragmentAlbumBinding
private var gson : Gson = Gson()
+ private var isLiked : Boolean = false
private val information = arrayListOf("수록곡","상세정보","영상")
+
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
@@ -28,7 +31,9 @@ class AlbumFragment : Fragment() {
val albumJson = arguments?.getString("album")
val album = gson.fromJson(albumJson, Album::class.java)
+ isLiked = isLikedAlbum(album.id)
setInit(album)
+ setOnClickListener(album)
binding.albumBackIv.setOnClickListener{
(context as MainActivity).supportFragmentManager.beginTransaction().
@@ -36,6 +41,8 @@ class AlbumFragment : Fragment() {
commitAllowingStateLoss()
}
+
+
val albumAdapter = AlbumVPAdapter(this)
binding.albumContentVp.adapter = albumAdapter
@@ -84,4 +91,46 @@ class AlbumFragment : Fragment() {
binding.albumSingerNameTv.text = album.singer.toString()
}
+ private fun getJwt() : Int {
+ val spf = requireActivity().getSharedPreferences("auth", AppCompatActivity.MODE_PRIVATE)
+ return spf.getInt("jwt", 0)
+ }
+
+ private fun likeAlbum(userId : Int, albumId : Int) {
+ val songDB = SongDatabase.getInstance(requireActivity())!!
+ val like = Like(userId, albumId)
+
+ songDB.albumDao().likeAlbum(like)
+ }
+
+ private fun isLikedAlbum(albumId : Int) : Boolean {
+ val songDB = SongDatabase.getInstance(requireActivity())!!
+ val userId = getJwt()
+
+ val likeId : Int? = songDB.albumDao().isLikedAlbum(userId, albumId)
+ return likeId != null
+ }
+
+ private fun disLikeAlbum(albumId : Int) {
+ val songDB = SongDatabase.getInstance(requireActivity())!!
+ val userId = getJwt()
+
+ songDB.albumDao().dislikedAlbum(userId, albumId)
+ }
+
+ private fun setOnClickListener(album : Album) {
+ val userId = getJwt()
+ binding.albumLikeIv.setOnClickListener {
+ if(isLiked) {
+ binding.albumLikeIv.setImageResource(R.drawable.ic_my_like_off)
+ disLikeAlbum(album.id)
+ }
+
+ else {
+ binding.albumLikeIv.setImageResource((R.drawable.ic_my_like_on))
+ likeAlbum(userId, album.id)
+ }
+ }
+
+ }
}
\ No newline at end of file
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/Like.kt
new file mode 100644
index 0000000..3d48b17
--- /dev/null
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/Like.kt
@@ -0,0 +1,12 @@
+package com.example.umc_6th
+
+import androidx.room.Entity
+import androidx.room.PrimaryKey
+
+@Entity(tableName = "LikeTable")
+data class Like(
+ var userId : Int,
+ var albumId : Int
+){
+ @PrimaryKey(autoGenerate = true) var id : Int = 0
+}
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/LockerAlbumRVAdapter.kt
index b88a30d..33b6c75 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/LockerAlbumRVAdapter.kt
@@ -12,6 +12,7 @@ class LockerAlbumRVAdapter () : RecyclerView.Adapter()
+ private var isGrayOverlayEnabled = false
override fun onCreateViewHolder(
parent: ViewGroup,
@@ -31,6 +32,14 @@ class LockerAlbumRVAdapter () : RecyclerView.Adapter
+
+ private lateinit var chartTv : TextView
+ private lateinit var videoTv : TextView
+ private lateinit var genreTv : TextView
+ private lateinit var situationTv : TextView
+ private lateinit var audioTv : TextView
+ private lateinit var atmosphereTv : TextView
+
+ private lateinit var textList: List
+
+ lateinit var scrollView : ScrollView
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
@@ -16,7 +46,69 @@ class LookFragment : Fragment() {
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
- // Inflate the layout for this fragment
- return inflater.inflate(R.layout.fragment_look, container, false)
+ binding = FragmentLookBinding.inflate(inflater, container, false)
+ songDB = SongDatabase.getInstance(requireContext())!!
+
+ // 스크롤 뷰 초기화
+ scrollView = binding.lookSv
+
+ // 버튼 초기화
+ chartBtn = binding.lookChartBtn
+ videoBtn = binding.lookVideoBtn
+ genreBtn = binding.lookGenreBtn
+ situationBtn = binding.lookSituationBtn
+ audioBtn = binding.lookAudioBtn
+ atmosphereBtn = binding.lookAtmostphereBtn
+
+ buttonList = listOf(chartBtn, videoBtn, genreBtn, situationBtn, audioBtn, atmosphereBtn)
+
+ // 텍스트 초기화
+ chartTv = binding.lookChartTv
+ videoTv = binding.lookVideoTv
+ genreTv = binding.lookGenreTv
+ situationTv = binding.lookSituationTv
+ audioTv = binding.lookAudioTv
+ atmosphereTv = binding.lookAtmostphereTv
+
+ textList = listOf(chartTv, videoTv, genreTv, situationTv, audioTv, atmosphereTv)
+
+ setButtonClickListeners()
+
+ return binding.root
+ }
+
+ override fun onStart() {
+ super.onStart()
+ initRecyclerview()
+ }
+
+ private fun initRecyclerview(){
+ val recyclerView = binding.lookChartSongRv
+ recyclerView.layoutManager = LinearLayoutManager(requireActivity())
+ val lookAlbumRVAdapter = LockerAlbumRVAdapter()
+
+ binding.lookChartSongRv.adapter = lookAlbumRVAdapter
+ lookAlbumRVAdapter.addSongs(songDB.songDao().getSongs() as ArrayList)
+ }
+
+ private fun setButtonClickListeners() {
+ for (i in buttonList.indices) {
+ val button = buttonList[i]
+
+ button.setOnClickListener {
+ initButton(i)
+ }
+ }
+ }
+
+ private fun initButton(idx : Int) {
+ for(presentBtn : Button in buttonList) {
+ if(presentBtn == buttonList[idx]) {
+ presentBtn.setBackgroundResource(R.drawable.selected_button)
+ } else {
+ presentBtn.setBackgroundResource(R.drawable.not_selected_button)
+ }
+ }
+ scrollView.smoothScrollTo(0, textList[idx].top)
}
}
\ No newline at end of file
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/MainActivity.kt
index 6d899eb..89b9be8 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/MainActivity.kt
@@ -1,5 +1,6 @@
package com.example.umc_6th
+import LookFragment
import androidx.appcompat.app.AppCompatActivity
import android.content.Intent
import android.os.Bundle
@@ -45,13 +46,6 @@ class MainActivity : AppCompatActivity() {
}
binding.mainPlayerCl.setOnClickListener {
-// val intent = Intent(this, SongActivity::class.java)
-// intent.putExtra("title", song.title)
-// intent.putExtra("singer", song.singer)
-// intent.putExtra("second", song.second)
-// intent.putExtra("playTime", song.playTime)
-// intent.putExtra("isPlaying", song.isPlaying)
-// intent.putExtra("music",song.music)
val editor = getSharedPreferences("song", MODE_PRIVATE).edit()
editor.putInt("songId", song.id)
editor.apply()
@@ -235,7 +229,7 @@ class MainActivity : AppCompatActivity() {
0,
240,
false,
- "music_bbom",
+ "music_bboom",
R.drawable.img_album_exp5,
false,
4
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/SavedAlbumFragment.kt
index 4ca14a0..2edf4af 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/SavedAlbumFragment.kt
@@ -1,15 +1,19 @@
package com.example.umc_6th
import android.os.Bundle
+import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
+import androidx.recyclerview.widget.LinearLayoutManager
import com.example.umc_6th.databinding.FragmentLockerSavedalbumBinding
class SavedAlbumFragment : Fragment() {
lateinit var binding: FragmentLockerSavedalbumBinding
+ lateinit var albumDB: SongDatabase
override fun onCreateView(
inflater: LayoutInflater,
@@ -17,7 +21,38 @@ class SavedAlbumFragment : Fragment() {
savedInstanceState: Bundle?
): View? {
binding = FragmentLockerSavedalbumBinding.inflate(inflater,container,false)
+
+ albumDB = SongDatabase.getInstance(requireContext())!!
+
return binding.root
}
+ override fun onStart() {
+ super.onStart()
+ initRecyclerview()
+ }
+
+ private fun initRecyclerview(){
+ binding.lockerSavedSongRecyclerView.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
+
+ val albumRVAdapter = SavedAlbumRVAdapter()
+ //리스너 객체 생성 및 전달
+
+ albumRVAdapter.setMyItemClickListener(object : SavedAlbumRVAdapter.MyItemClickListener{
+ override fun onRemoveSong(songId: Int) {
+ albumDB.albumDao().getLikedAlbums(getJwt())
+ }
+ })
+ binding.lockerSavedSongRecyclerView.adapter = albumRVAdapter
+
+ albumRVAdapter.addAlbums(albumDB.albumDao().getLikedAlbums(getJwt()) as ArrayList)
+ }
+
+ private fun getJwt() : Int {
+ val spf = activity?.getSharedPreferences("auth" , AppCompatActivity.MODE_PRIVATE)
+ val jwt = spf!!.getInt("jwt", 0)
+ Log.d("MAIN_ACT/GET_JWT", "jwt_token: $jwt")
+
+ return jwt
+ }
}
\ No newline at end of file
diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/SavedAlbumRVAdapter.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/SavedAlbumRVAdapter.kt
new file mode 100644
index 0000000..f240878
--- /dev/null
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/SavedAlbumRVAdapter.kt
@@ -0,0 +1,60 @@
+package com.example.umc_6th
+
+import android.annotation.SuppressLint
+import android.view.LayoutInflater
+import android.view.ViewGroup
+import androidx.recyclerview.widget.RecyclerView
+import com.example.umc_6th.databinding.ItemLockerAlbumBinding
+
+
+class SavedAlbumRVAdapter (): RecyclerView.Adapter() {
+ private val albums = ArrayList()
+
+ interface MyItemClickListener{
+ fun onRemoveSong(songId: Int)
+ }
+
+ private lateinit var mItemClickListener: MyItemClickListener
+
+ fun setMyItemClickListener(itemClickListener: MyItemClickListener){
+ mItemClickListener = itemClickListener
+ }
+
+ override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): SavedAlbumRVAdapter.ViewHolder {
+ val binding: ItemLockerAlbumBinding = ItemLockerAlbumBinding.inflate(LayoutInflater.from(viewGroup.context), viewGroup, false)
+
+ return ViewHolder(binding)
+ }
+
+ override fun onBindViewHolder(holder: SavedAlbumRVAdapter.ViewHolder, position: Int) {
+ holder.bind(albums[position])
+ holder.binding.itemLockerAlbumMoreIv.setOnClickListener {
+ mItemClickListener.onRemoveSong(albums[position].id)
+ removeSong(position)
+ }
+ }
+
+ override fun getItemCount(): Int = albums.size
+
+ @SuppressLint("NotifyDataSetChanged")
+ fun addAlbums(albums: ArrayList) {
+ this.albums.clear()
+ this.albums.addAll(albums)
+
+ notifyDataSetChanged()
+ }
+
+ fun removeSong(position: Int){
+ albums.removeAt(position)
+ notifyDataSetChanged()
+ }
+
+ inner class ViewHolder(val binding: ItemLockerAlbumBinding) : RecyclerView.ViewHolder(binding.root){
+ fun bind(album: Album){
+ binding.itemLockerAlbumCoverImgIv.setImageResource(album.coverImg!!)
+ binding.itemLockerAlbumTitleTv.text = album.title
+ binding.itemLockerAlbumSingerTv.text = album.singer
+ }
+ }
+
+}
\ No newline at end of file
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/SignUpActivity.kt
new file mode 100644
index 0000000..30301db
--- /dev/null
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/SignUpActivity.kt
@@ -0,0 +1,49 @@
+package com.example.umc_6th
+
+import android.os.Bundle
+import android.util.Log
+import android.widget.Toast
+import androidx.appcompat.app.AppCompatActivity
+import com.example.umc_6th.databinding.ActivitySignupBinding
+
+class SignUpActivity : AppCompatActivity(){
+
+ lateinit var binding : ActivitySignupBinding
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ binding = ActivitySignupBinding.inflate(layoutInflater)
+ setContentView(binding.root)
+
+ binding.signUpSignUpBtn.setOnClickListener{
+ signUp()
+ }
+ }
+
+ private fun getUser() : User{
+ val email : String = binding.signUpIdEt.text.toString() + "@" + binding.signUpDirectInputEt.text.toString()
+ val pwd : String = binding.signUpPasswordEt.text.toString()
+
+ return User(email, pwd)
+ }
+
+ private fun signUp() {
+ if (binding.signUpIdEt.text.toString().isEmpty() || binding.signUpDirectInputEt.text.toString().isEmpty()){
+ Toast.makeText(this,"이메일 형식이 잘못되었습니다.",Toast.LENGTH_SHORT).show()
+ return
+ }
+ if (binding.signUpPasswordEt.text.toString() != binding.signUpPasswordCheckEt.text.toString()){
+ Toast.makeText(this,"비밀번호가 일치하지 않습니다",Toast.LENGTH_SHORT).show()
+ return
+ }
+
+ val userDB = SongDatabase.getInstance(this)!!
+ userDB.userDao().insert(getUser())
+
+ val user = userDB.userDao().getUsers()
+ Log.d("Sign-up",user.toString())
+
+ Toast.makeText(this,"회원가입이 완료되었습니다.",Toast.LENGTH_SHORT).show()
+ return
+ }
+}
\ No newline at end of file
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/SongActivity.kt
index ec92cba..357cabb 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/SongActivity.kt
@@ -1,5 +1,6 @@
package com.example.umc_6th
+import android.annotation.SuppressLint
import android.app.ActivityManager
import android.content.Context
import android.content.Intent
@@ -47,9 +48,6 @@ class SongActivity : AppCompatActivity() {
// setPlayer(song)
initClickListener()
- var title : String? = null
- var singer : String? = null
-
// if(intent.hasExtra("title") && intent.hasExtra("singer")){
// title = intent.getStringExtra("title")
// singer = intent.getStringExtra("singer")
@@ -176,6 +174,8 @@ class SongActivity : AppCompatActivity() {
}
private fun moveSong(direct: Int){
+ Log.d("moveSong", "현재 위치: $nowPos, 이동 방향: $direct, 총 곡 수: ${songs.size}")
+
if(nowPos + direct < 0){
// nowPos = songs.size -1
CustomSnackbar.make(binding.root, "처음 곡입니다.").show()
@@ -215,6 +215,13 @@ class SongActivity : AppCompatActivity() {
binding.songProgressSb.progress = (song.second * 1000 / song.playTime)
val music = resources.getIdentifier(song.music,"raw",this.packageName)
+
+ Log.d("setPlayer", "음악 리소스 ID: $music")
+ if (music == 0) {
+ Log.e("setPlayer", "음악 리소스 ID를 찾을 수 없습니다: ${song.music}")
+ return
+ }
+
mediaPlayer = MediaPlayer.create(this,music)
if(song.isLike){
@@ -222,7 +229,6 @@ class SongActivity : AppCompatActivity() {
} else{
binding.songLikeIv.setImageResource(R.drawable.ic_my_like_off)
}
-
setPlayerStatus(song.isPlaying)
}
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/SongDatabase.kt
index 8bb2233..be55d68 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/SongDatabase.kt
@@ -5,11 +5,11 @@ import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
-@Database(entities = [Song::class, Album::class], version = 1)
+@Database(entities = [Song::class, Album::class, User::class,Like::class], version = 1)
abstract class SongDatabase: RoomDatabase() {
abstract fun songDao(): SongDao
abstract fun albumDao() : AlbumDao
-
+ abstract fun userDao() : UserDao
companion object{
private var instance: SongDatabase? = null
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/User.kt
new file mode 100644
index 0000000..017dfb8
--- /dev/null
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/User.kt
@@ -0,0 +1,12 @@
+package com.example.umc_6th
+
+import androidx.room.Entity
+import androidx.room.PrimaryKey
+
+@Entity(tableName = "UserTable")
+data class User(
+ var email : String,
+ var password : String
+){
+ @PrimaryKey(autoGenerate = true) var id : Int = 0
+}
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/UserDao.kt
new file mode 100644
index 0000000..bb15eca
--- /dev/null
+++ b/UMC_6th/app/src/main/java/com/example/umc_6th/UserDao.kt
@@ -0,0 +1,17 @@
+package com.example.umc_6th
+
+import androidx.room.Dao
+import androidx.room.Insert
+import androidx.room.Query
+
+@Dao
+interface UserDao {
+ @Insert
+ fun insert(user : User)
+
+ @Query("SELECT * FROM UserTable")
+ fun getUsers() : List
+
+ @Query("SELECT * FROM usertable WHERE email = :email AND password = :password")
+ fun getUser(email : String ,password : String) : User?
+}
\ No newline at end of file
diff --git a/UMC_6th/app/src/main/res/drawable/not_selected_button.xml b/UMC_6th/app/src/main/res/drawable/not_selected_button.xml
new file mode 100644
index 0000000..4a3ab47
--- /dev/null
+++ b/UMC_6th/app/src/main/res/drawable/not_selected_button.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/UMC_6th/app/src/main/res/drawable/selected_button.xml b/UMC_6th/app/src/main/res/drawable/selected_button.xml
new file mode 100644
index 0000000..6d2e9bf
--- /dev/null
+++ b/UMC_6th/app/src/main/res/drawable/selected_button.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/UMC_6th/app/src/main/res/layout/activity_login.xml b/UMC_6th/app/src/main/res/layout/activity_login.xml
new file mode 100644
index 0000000..5dbeaa3
--- /dev/null
+++ b/UMC_6th/app/src/main/res/layout/activity_login.xml
@@ -0,0 +1,319 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/UMC_6th/app/src/main/res/layout/activity_signup.xml b/UMC_6th/app/src/main/res/layout/activity_signup.xml
new file mode 100644
index 0000000..3e803d8
--- /dev/null
+++ b/UMC_6th/app/src/main/res/layout/activity_signup.xml
@@ -0,0 +1,223 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/UMC_6th/app/src/main/res/layout/fragment_locker_savedalbum.xml b/UMC_6th/app/src/main/res/layout/fragment_locker_savedalbum.xml
index 04bf526..2f7e2d0 100644
--- a/UMC_6th/app/src/main/res/layout/fragment_locker_savedalbum.xml
+++ b/UMC_6th/app/src/main/res/layout/fragment_locker_savedalbum.xml
@@ -1,17 +1,18 @@
-
+ android:layout_height="match_parent">
-
+ android:layout_height="match_parent"
+ tools:listitem="@layout/item_locker_album"
+ android:overScrollMode="never"
+ android:orientation="vertical"
+ app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
\ No newline at end of file
diff --git a/UMC_6th/app/src/main/res/layout/fragment_look.xml b/UMC_6th/app/src/main/res/layout/fragment_look.xml
index 596af50..4cc8cf8 100644
--- a/UMC_6th/app/src/main/res/layout/fragment_look.xml
+++ b/UMC_6th/app/src/main/res/layout/fragment_look.xml
@@ -1,14 +1,294 @@
-
-
+
+
+ android:layout_height="wrap_content"
+ android:paddingVertical="20dp"
+ android:scrollbars="none"
+ app:layout_constraintTop_toBottomOf="@+id/textView2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
+
\ No newline at end of file