Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d863e85
[week1] μ½”λ“œ 리뷰 μ°Έκ³ ν•˜μ—¬ 이미지, ν…μŠ€νŠΈ λ°°μ—΄ 및 이미지 λ³€μˆ˜λͺ… μˆ˜μ •_제이미 (#9)
HwangJaemin49 Oct 11, 2024
bfa49f1
[week4] Thread & Coroutine
HwangJaemin49 Oct 27, 2024
87c5865
[Week4] Thread & Coroutine_Jamie (#13)
HwangJaemin49 Nov 6, 2024
4b21be3
Create week4
HwangJaemin49 Nov 6, 2024
cf8798d
Delete week4
HwangJaemin49 Nov 6, 2024
b5343f2
week4 폴더 생성
HwangJaemin49 Nov 6, 2024
fe9c2c7
Delete week4 directory
HwangJaemin49 Nov 6, 2024
2e28a0d
[week2] bottom tab navigation 제이미 (#10)
HwangJaemin49 Nov 10, 2024
2a474dd
:recycle: week1~week4 폴더 정리
SuHyeon00 Nov 10, 2024
3667462
:recycle: week4 폴더 정리
SuHyeon00 Nov 10, 2024
6d16632
merge upstream jamie
SuHyeon00 Nov 10, 2024
04a0cdf
[week5] LifeCycle - Memo Application / Jamie (#19)
HwangJaemin49 Nov 10, 2024
5b817c0
[week6] Flo Clone Coding
HwangJaemin49 Nov 13, 2024
d2d49d9
[week6] Flo Clone Coding
HwangJaemin49 Nov 13, 2024
2bfa87a
[week6] Flo Clone Coding
HwangJaemin49 Nov 13, 2024
d57b16c
[week6] .idea directory delete
HwangJaemin49 Nov 13, 2024
cbc7b96
7주ì°[week7] Database
HwangJaemin49 Nov 27, 2024
2f4e6ca
[week7] Database
HwangJaemin49 Nov 27, 2024
c08df4f
[week 7] μ’‹μ•„μš” κΈ°λŠ₯ μΆ”κ°€
HwangJaemin49 Nov 29, 2024
f0f2264
[week8] νšŒμ›κ°€μž…, 둜그인/λ‘œκ·Έμ•„μ›ƒ, 앨범 μ’‹μ•„μš”
HwangJaemin49 Nov 29, 2024
d9359cf
[week9] μ‹€μŠ΅ νšŒμ›κ°€μž…, μ‹€μŠ΅ 둜그인
HwangJaemin49 Nov 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,16 @@ google-services.json

# Android Profiling
*.hprof
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
15 changes: 15 additions & 0 deletions flo-clone/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
1 change: 1 addition & 0 deletions flo-clone/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
73 changes: 73 additions & 0 deletions flo-clone/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
id("kotlin-kapt")
}

android {
namespace = "com.example.flo_clone"
compileSdk = 35

defaultConfig {
applicationId = "com.example.flo_clone"
minSdk = 21
targetSdk = 35
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
viewBinding = true
}
}

dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.lifecycle.livedata.ktx)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)
implementation(libs.gson)
implementation(libs.androidx.media3.common.ktx)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)

implementation(libs.androidx.room.ktx)
implementation(libs.androidx.room.runtime)
kapt(libs.androidx.room.compiler)

implementation(libs.retrofit)
implementation(libs.converter.gson)
implementation (libs.adapter.rxjava2)


implementation (libs.glide)
annotationProcessor (libs.compiler)


implementation (libs.okhttp)
implementation (libs.logging.interceptor)

}
21 changes: 21 additions & 0 deletions flo-clone/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.example.flo_clone

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.flo_clone", appContext.packageName)
}
}
33 changes: 33 additions & 0 deletions flo-clone/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.FLOclone"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".SongActivity"
android:exported="true" />
</application>

</manifest>
12 changes: 12 additions & 0 deletions flo-clone/app/src/main/java/com/example/flo_clone/Album.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.example.flo_clone

import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "AlbumTable")
class Album (
@PrimaryKey(autoGenerate = false) var id: Int = 0,
var title: String? = "",
var singer: String? ="",
var coverImg: Int? = null
)
29 changes: 29 additions & 0 deletions flo-clone/app/src/main/java/com/example/flo_clone/AlbumDao.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.example.flo_clone

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query

@Dao
interface AlbumDao {

@Insert
fun insert(album:Album)

@Query("SELECT * FROM AlbumTable")
fun getAlbums():List<Album>

@Insert
fun likeAlbum(like: Like)

@Query("SELECT id FROM LikeTable WHERE userId = :userId AND albumId = :albumId")
fun isLikedAlbum(userId:Int, albumId:Int) : Int?

@Query("DELETE FROM LikeTable WHERE userId = :userId AND albumId = :albumId")
fun disLikedAlbum(userId:Int, albumId:Int)

@Query("SELECT AT.* FROM LikeTable as LT LEFT JOIN AlbumTable as AT ON LT.albumId = AT.id WHERE LT.userId = :userId")

fun getLikedAlbums(userId: Int): List<Album>

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package com.example.flo

import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.example.flo_clone.Album
import com.example.flo_clone.databinding.ItemLockerAlbumBinding

class AlbumLockerRVAdapter (): RecyclerView.Adapter<AlbumLockerRVAdapter.ViewHolder>() {
private val albums = ArrayList<Album>()

interface MyItemClickListener{
fun onRemoveSong(songId: Int)
}

private lateinit var mItemClickListener: MyItemClickListener

fun setMyItemClickListener(itemClickListener: MyItemClickListener){
mItemClickListener = itemClickListener
}

override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): AlbumLockerRVAdapter.ViewHolder {
val binding: ItemLockerAlbumBinding = ItemLockerAlbumBinding.inflate(LayoutInflater.from(viewGroup.context), viewGroup, false)

return ViewHolder(binding)
}

override fun onBindViewHolder(holder: AlbumLockerRVAdapter.ViewHolder, position: Int) {
holder.bind(albums[position])
holder.binding.itemAlbumMoreIv.setOnClickListener {
mItemClickListener.onRemoveSong(albums[position].id)
removeSong(position)
}
}

override fun getItemCount(): Int = albums.size

@SuppressLint("NotifyDataSetChanged")
fun addAlbums(albums: ArrayList<Album>) {
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.itemAlbumImgIv.setImageResource(album.coverImg!!)
binding.itemAlbumTitleTv.text = album.title
binding.itemAlbumSingerTv.text = album.singer
}
}

}
15 changes: 15 additions & 0 deletions flo-clone/app/src/main/java/com/example/flo_clone/AuthResponse.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.example.flo_clone

import com.google.gson.annotations.SerializedName

data class AuthResponse(
@SerializedName(value = "inSuccess") val inSuccess:Boolean,
@SerializedName(value = "code") val code:Int,
@SerializedName(value = "message") val message:String,
@SerializedName(value = "result") val result: Result?
)

data class Result(
@SerializedName(value = "memberId") var memberId : Int,
@SerializedName(value = "accessToken") var accessToken : String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.flo_clone

import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.POST

interface AuthRetrofitInterface {
@POST("/login")
fun signUp(@Body user: User): Call<AuthResponse>

@POST("/join")
fun login(@Body user: User): Call<AuthResponse>
}
Loading