Skip to content

Commit

Permalink
Merge pull request #8 from SSUMC-6th/kara/#7
Browse files Browse the repository at this point in the history
[kara/#7] feat: 2주차 구현 완료
  • Loading branch information
hyowon0204 authored Apr 16, 2024
2 parents 9b0e4df + 7bce021 commit 4de7022
Show file tree
Hide file tree
Showing 146 changed files with 2,546 additions and 46 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/Android_A.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion UMC_6th/.idea/vcs.xml → .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions UMC_6th/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions UMC_6th/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion UMC_6th/.idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions UMC_6th/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion UMC_6th/.idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 18 additions & 11 deletions UMC_6th/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsKotlinAndroid)
}

android {
namespace = "com.example.umc_6th"
namespace = "com.example.myfirstapp"
compileSdk = 34


buildFeatures {
viewBinding = true
}

defaultConfig {
applicationId = "com.example.umc_6th"
applicationId = "com.example.myfirstapp"
minSdk = 24
targetSdk = 34
versionCode = 1
Expand Down Expand Up @@ -37,11 +42,13 @@ android {

dependencies {

implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.activity)
implementation(libs.androidx.constraintlayout)
implementation ("androidx.fragment:fragment-ktx:1.6.2")
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.umc_6th
package com.example.myfirstapp

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand All @@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.umc_6th", appContext.packageName)
assertEquals("com.example.myfirstapp", appContext.packageName)
}
}
6 changes: 5 additions & 1 deletion UMC_6th/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.UMC_6th"
android:theme="@style/Theme.MyApplication"
tools:targetApi="31">
<activity
android:name=".MainActivity"
Expand All @@ -21,6 +21,10 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SongActivity"
android:exported="true">
</activity>
</application>

</manifest>
50 changes: 50 additions & 0 deletions UMC_6th/app/src/main/java/com/example/myfirstapp/AlbumFragment.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.example.myfirstapp

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.fragment.app.Fragment
import com.example.myfirstapp.databinding.FragmentAlbumBinding

class AlbumFragment : Fragment() {

lateinit var binding : FragmentAlbumBinding

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
binding = FragmentAlbumBinding.inflate(inflater,container,false)

//HomeFragment를 AlbumFragment로 전환할때 전달된 데이터 받는 곳(bundle을 이용해 전달 가능)
binding.albumTitleTv.text = arguments?.getString("title")
binding.albumSingerTv.text = arguments?.getString("singer")

binding.albumBackIv.setOnClickListener{
(context as MainActivity).supportFragmentManager.beginTransaction().replace(R.id.main_container,HomeFragment()).commitAllowingStateLoss()
}
binding.albumSongLalacCl.setOnClickListener{
Toast.makeText(activity,"LILAC",Toast.LENGTH_SHORT).show()
}
binding.albumSongFluCl.setOnClickListener{
Toast.makeText(activity,"FLU",Toast.LENGTH_SHORT).show()
}
binding.albumSongCoinCl.setOnClickListener{
Toast.makeText(activity,"Coin",Toast.LENGTH_SHORT).show()
}
binding.albumSongSpringhelloCl.setOnClickListener{
Toast.makeText(activity,"봄 안녕 봄",Toast.LENGTH_SHORT).show()
}
binding.albumSongCelebrityCl.setOnClickListener{
Toast.makeText(activity,"Celebrity",Toast.LENGTH_SHORT).show()
}
binding.albumSongSingCl.setOnClickListener{
Toast.makeText(activity,"돌림노래 (Feat.DEAN)",Toast.LENGTH_SHORT).show()
}

return binding.root
}
}
34 changes: 34 additions & 0 deletions UMC_6th/app/src/main/java/com/example/myfirstapp/HomeFragment.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.example.myfirstapp

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.databinding.FragmentHomeBinding

class HomeFragment : Fragment() {

lateinit var binding: FragmentHomeBinding
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {

binding = FragmentHomeBinding.inflate(inflater, container, false)
binding.homeTodayAlbum1Iv.setOnClickListener {
//HomeFragment를 AlbumFragment로 전환할때 데이터도 이동(bundle을 이용해 전달 가능)
val bundle = Bundle()
bundle.putString("title", binding.homeTodayAlbumTitleTv.text.toString())
bundle.putString("singer", binding.homeTodaySingerTv.text.toString())

val albumFragment = AlbumFragment()
albumFragment.arguments = bundle

(context as MainActivity).supportFragmentManager.beginTransaction()
.replace(R.id.main_container, albumFragment).commitAllowingStateLoss()
}
return binding.root
}
}
19 changes: 19 additions & 0 deletions UMC_6th/app/src/main/java/com/example/myfirstapp/LockerFragment.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.example.myfirstapp

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment

class LockerFragment : Fragment() {
// 여기에 Fragment의 구현 내용을 작성합니다.
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// 여기에서 Fragment의 레이아웃을 인플레이트합니다.
return inflater.inflate(R.layout.fragment_locker, container, false)
}
}
19 changes: 19 additions & 0 deletions UMC_6th/app/src/main/java/com/example/myfirstapp/LookFragment.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.example.myfirstapp

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment

class LookFragment : Fragment() {
// 여기에 Fragment의 구현 내용을 작성합니다.
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
// 여기에서 Fragment의 레이아웃을 인플레이트합니다.
return inflater.inflate(R.layout.fragment_look, container, false)
}
}
Loading

0 comments on commit 4de7022

Please sign in to comment.