From 6cdaecad4e78449194b38b2eae26d017add92eb3 Mon Sep 17 00:00:00 2001 From: Ssamssamukja <109636635+Ssamssamukja@users.noreply.github.com> Date: Wed, 24 Apr 2024 19:51:09 +0900 Subject: [PATCH] =?UTF-8?q?[nunu/#13]=20feat:=203=EC=A3=BC=EC=B0=A8=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20=EC=99=84=EB=A3=8C=20(#17)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [nunu/#13] feat: 3주차-1 - [SongActivity]화면 반복재생, 전체재생 이미지 교체해보기 - [AlbumFragment]에 있는 데이터로 [SongActivity]화면 렌더링 - [AlbumFragment]화면 내 취향 MIX 버튼 클릭시 이미지 변경해보기 * [nunu/#13] 3주차-2 구현 - HomeFragment에서 banner 부분 Viewpager 구현하기 - AlbumFragment 에 TabLayout + Viewpager 추가 구현하기 - AlbumFragment Viewpager 에 AlbumSongsFragment, AlbumDetailFragment, AlbumVideoFragment 구현하기 - [LockerFragment] 화면 TabLayout과 Viewpager로 구현하기 +디자인 수정 필요 * [nunu/#13] feat 3주차-2 * [nunu/#13] feat: 3주차-3 완료 - [HomeFragment]화면Panel 부분 Viewpager로 구현해보고 Indicator 추가해보기 - 오픈소스 라이브러리인 CircleIndicator 활용해서 슬라이드 만들어보기 - 일정 시간 후 다음 화면으로 넘어가는 자동 슬라이드 구현해보기 --- .idea/deploymentTargetDropDown.xml | 18 +- ...tion_annotation_experimental_1_3_0_aar.xml | 13 + ...droidx_annotation_annotation_jvm_1_6_0.xml | 12 + ...androidx_appcompat_appcompat_1_6_1_aar.xml | 16 + ...ppcompat_appcompat_resources_1_6_1_aar.xml | 13 + ...__androidx_arch_core_core_common_2_2_0.xml | 12 + ...roidx_arch_core_core_runtime_2_2_0_aar.xml | 13 + ...__androidx_cardview_cardview_1_0_0_aar.xml | 13 + ...__androidx_collection_collection_1_1_0.xml | 12 + ...dx_concurrent_concurrent_futures_1_1_0.xml | 12 + ...raintlayout_constraintlayout_2_1_4_aar.xml | 13 + ...atorlayout_coordinatorlayout_1_1_0_aar.xml | 16 + .../Gradle__androidx_core_core_1_12_0_aar.xml | 16 + ...dle__androidx_core_core_ktx_1_12_0_aar.xml | 13 + ..._cursoradapter_cursoradapter_1_0_0_aar.xml | 12 + ...droidx_customview_customview_1_1_0_aar.xml | 12 + ...oidx_databinding_viewbinding_8_2_2_aar.xml | 12 + ...dx_documentfile_documentfile_1_0_0_aar.xml | 12 + ...dx_drawerlayout_drawerlayout_1_1_1_aar.xml | 16 + ...icanimation_dynamicanimation_1_0_0_aar.xml | 12 + ...__androidx_fragment_fragment_1_3_6_aar.xml | 16 + ...dx_interpolator_interpolator_1_0_0_aar.xml | 12 + ...cy_legacy_support_core_utils_1_0_0_aar.xml | 12 + ...adle__androidx_loader_loader_1_0_0_aar.xml | 12 + ...anager_localbroadcastmanager_1_0_0_aar.xml | 12 + ...Gradle__androidx_print_print_1_0_0_aar.xml | 15 + ...dx_recyclerview_recyclerview_1_1_0_aar.xml | 16 + ...on_resourceinspection_annotation_1_0_1.xml | 12 + ...droidx_savedstate_savedstate_1_2_1_aar.xml | 13 + ...le__androidx_test_annotation_1_0_1_aar.xml | 12 + .../Gradle__androidx_test_core_1_5_0_aar.xml | 15 + ..._test_espresso_espresso_core_3_5_1_aar.xml | 14 + ...sso_espresso_idling_resource_3_5_1_aar.xml | 14 + ...dle__androidx_test_ext_junit_1_1_5_aar.xml | 14 + ...radle__androidx_test_monitor_1_6_1_aar.xml | 14 + ...Gradle__androidx_test_runner_1_5_2_aar.xml | 14 + ...droidx_test_services_storage_1_4_2_aar.xml | 14 + ...le__androidx_tracing_tracing_1_0_0_aar.xml | 12 + ...droidx_transition_transition_1_2_0_aar.xml | 16 + ...ectordrawable_vectordrawable_1_1_0_aar.xml | 12 + ...able_vectordrawable_animated_1_1_0_aar.xml | 12 + ...rcelable_versionedparcelable_1_1_1_aar.xml | 12 + ...droidx_viewpager2_viewpager2_1_0_0_aar.xml | 16 + ...androidx_viewpager_viewpager_1_0_0_aar.xml | 12 + ...e_android_material_material_1_11_0_aar.xml | 16 + ..._com_google_code_findbugs_jsr305_2_0_2.xml | 10 + ..._com_google_guava_listenablefuture_1_0.xml | 14 + .../Gradle__com_squareup_javawriter_2_1_1.xml | 14 + .../Gradle__javax_inject_javax_inject_1.xml | 14 + .../libraries/Gradle__junit_junit_4_13_2.xml | 14 + ...le__me_relex_circleindicator_2_1_6_aar.xml | 15 + ...Gradle__org_hamcrest_hamcrest_core_1_3.xml | 14 + ..._org_hamcrest_hamcrest_integration_1_3.xml | 14 + ...dle__org_hamcrest_hamcrest_library_1_3.xml | 14 + .idea/modules/app/UMC_6th.app.androidTest.iml | 158 ++++ .idea/modules/app/UMC_6th.app.iml | 31 + .idea/modules/app/UMC_6th.app.main.iml | 137 +++ .idea/modules/app/UMC_6th.app.unitTest.iml | 133 +++ UMC_6th/app/build.gradle.kts | 2 + .../example/umc_6th/AlbumDetailFragment.kt | 22 + .../java/com/example/umc_6th/AlbumFragment.kt | 41 +- .../com/example/umc_6th/AlbumSongsFragment.kt | 55 ++ .../com/example/umc_6th/AlbumVideoFragment.kt | 21 + .../example/umc_6th/FragmentHomeMainBanner.kt | 21 + .../umc_6th/FragmentHomeMainBanner2.kt | 21 + .../java/com/example/umc_6th/HomeFragment.kt | 68 +- .../java/com/example/umc_6th/SongActivity.kt | 17 + .../umc_6th/adapter/AlbumPagerAdapter.kt | 28 + .../umc_6th/adapter/HomePagerAdapter.kt | 19 + .../src/main/res/layout/fragment_album.xml | 864 ++++-------------- .../main/res/layout/fragment_album_detail.xml | 6 + .../main/res/layout/fragment_album_songs.xml | 549 +++++++++++ .../main/res/layout/fragment_album_video.xml | 6 + .../app/src/main/res/layout/fragment_home.xml | 196 ++-- .../main/res/layout/fragment_home_banner1.xml | 16 + .../main/res/layout/fragment_home_banner2.xml | 18 + .../res/layout/fragment_home_main_banner.xml | 120 +++ .../res/layout/fragment_home_main_banner2.xml | 120 +++ .../src/main/res/layout/fragment_locker.xml | 54 ++ 79 files changed, 2578 insertions(+), 875 deletions(-) create mode 100644 .idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_3_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_annotation_annotation_jvm_1_6_0.xml create mode 100644 .idea/libraries/Gradle__androidx_appcompat_appcompat_1_6_1_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_6_1_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_arch_core_core_common_2_2_0.xml create mode 100644 .idea/libraries/Gradle__androidx_arch_core_core_runtime_2_2_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml create mode 100644 .idea/libraries/Gradle__androidx_concurrent_concurrent_futures_1_1_0.xml create mode 100644 .idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_2_1_4_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_core_core_1_12_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_core_core_ktx_1_12_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_customview_customview_1_1_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_databinding_viewbinding_8_2_2_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_1_1_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_dynamicanimation_dynamicanimation_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_fragment_fragment_1_3_6_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_resourceinspection_resourceinspection_annotation_1_0_1.xml create mode 100644 .idea/libraries/Gradle__androidx_savedstate_savedstate_1_2_1_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_test_annotation_1_0_1_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_test_core_1_5_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_5_1_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_5_1_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_test_ext_junit_1_1_5_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_test_monitor_1_6_1_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_test_runner_1_5_2_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_test_services_storage_1_4_2_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_tracing_tracing_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_1_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml create mode 100644 .idea/libraries/Gradle__com_google_android_material_material_1_11_0_aar.xml create mode 100644 .idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_2.xml create mode 100644 .idea/libraries/Gradle__com_google_guava_listenablefuture_1_0.xml create mode 100644 .idea/libraries/Gradle__com_squareup_javawriter_2_1_1.xml create mode 100644 .idea/libraries/Gradle__javax_inject_javax_inject_1.xml create mode 100644 .idea/libraries/Gradle__junit_junit_4_13_2.xml create mode 100644 .idea/libraries/Gradle__me_relex_circleindicator_2_1_6_aar.xml create mode 100644 .idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml create mode 100644 .idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3.xml create mode 100644 .idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3.xml create mode 100644 .idea/modules/app/UMC_6th.app.androidTest.iml create mode 100644 .idea/modules/app/UMC_6th.app.iml create mode 100644 .idea/modules/app/UMC_6th.app.main.iml create mode 100644 .idea/modules/app/UMC_6th.app.unitTest.iml create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/AlbumDetailFragment.kt create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/AlbumSongsFragment.kt create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/AlbumVideoFragment.kt create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/FragmentHomeMainBanner.kt create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/FragmentHomeMainBanner2.kt create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/adapter/AlbumPagerAdapter.kt create mode 100644 UMC_6th/app/src/main/java/com/example/umc_6th/adapter/HomePagerAdapter.kt create mode 100644 UMC_6th/app/src/main/res/layout/fragment_album_detail.xml create mode 100644 UMC_6th/app/src/main/res/layout/fragment_album_songs.xml create mode 100644 UMC_6th/app/src/main/res/layout/fragment_album_video.xml create mode 100644 UMC_6th/app/src/main/res/layout/fragment_home_banner1.xml create mode 100644 UMC_6th/app/src/main/res/layout/fragment_home_banner2.xml create mode 100644 UMC_6th/app/src/main/res/layout/fragment_home_main_banner.xml create mode 100644 UMC_6th/app/src/main/res/layout/fragment_home_main_banner2.xml diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index ea6ebf3..93fa3ad 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -2,25 +2,9 @@ - + - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_3_0_aar.xml b/.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_3_0_aar.xml new file mode 100644 index 0000000..7969abb --- /dev/null +++ b/.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_3_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_annotation_annotation_jvm_1_6_0.xml b/.idea/libraries/Gradle__androidx_annotation_annotation_jvm_1_6_0.xml new file mode 100644 index 0000000..aff28aa --- /dev/null +++ b/.idea/libraries/Gradle__androidx_annotation_annotation_jvm_1_6_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_6_1_aar.xml b/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_6_1_aar.xml new file mode 100644 index 0000000..76340bc --- /dev/null +++ b/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_6_1_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_6_1_aar.xml b/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_6_1_aar.xml new file mode 100644 index 0000000..314a02d --- /dev/null +++ b/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_6_1_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_arch_core_core_common_2_2_0.xml b/.idea/libraries/Gradle__androidx_arch_core_core_common_2_2_0.xml new file mode 100644 index 0000000..98c1dea --- /dev/null +++ b/.idea/libraries/Gradle__androidx_arch_core_core_common_2_2_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_2_0_aar.xml b/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_2_0_aar.xml new file mode 100644 index 0000000..536364b --- /dev/null +++ b/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_2_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml new file mode 100644 index 0000000..e133e6b --- /dev/null +++ b/.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml b/.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml new file mode 100644 index 0000000..de055d6 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_concurrent_concurrent_futures_1_1_0.xml b/.idea/libraries/Gradle__androidx_concurrent_concurrent_futures_1_1_0.xml new file mode 100644 index 0000000..f68eac8 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_concurrent_concurrent_futures_1_1_0.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_2_1_4_aar.xml b/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_2_1_4_aar.xml new file mode 100644 index 0000000..3a5fc8c --- /dev/null +++ b/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_2_1_4_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml b/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml new file mode 100644 index 0000000..904761d --- /dev/null +++ b/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_core_core_1_12_0_aar.xml b/.idea/libraries/Gradle__androidx_core_core_1_12_0_aar.xml new file mode 100644 index 0000000..22c2709 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_core_core_1_12_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_core_core_ktx_1_12_0_aar.xml b/.idea/libraries/Gradle__androidx_core_core_ktx_1_12_0_aar.xml new file mode 100644 index 0000000..f473a5e --- /dev/null +++ b/.idea/libraries/Gradle__androidx_core_core_ktx_1_12_0_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml new file mode 100644 index 0000000..bdc667f --- /dev/null +++ b/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_customview_customview_1_1_0_aar.xml b/.idea/libraries/Gradle__androidx_customview_customview_1_1_0_aar.xml new file mode 100644 index 0000000..b3535d8 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_customview_customview_1_1_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_databinding_viewbinding_8_2_2_aar.xml b/.idea/libraries/Gradle__androidx_databinding_viewbinding_8_2_2_aar.xml new file mode 100644 index 0000000..70e8c79 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_databinding_viewbinding_8_2_2_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml new file mode 100644 index 0000000..8356f4c --- /dev/null +++ b/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_1_1_aar.xml b/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_1_1_aar.xml new file mode 100644 index 0000000..9a7db60 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_1_1_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_dynamicanimation_dynamicanimation_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_dynamicanimation_dynamicanimation_1_0_0_aar.xml new file mode 100644 index 0000000..55ab7a6 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_dynamicanimation_dynamicanimation_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_fragment_fragment_1_3_6_aar.xml b/.idea/libraries/Gradle__androidx_fragment_fragment_1_3_6_aar.xml new file mode 100644 index 0000000..38d1ac1 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_fragment_fragment_1_3_6_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml new file mode 100644 index 0000000..0e3e3ae --- /dev/null +++ b/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml new file mode 100644 index 0000000..a358efd --- /dev/null +++ b/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml new file mode 100644 index 0000000..202890e --- /dev/null +++ b/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml new file mode 100644 index 0000000..b4037f4 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml new file mode 100644 index 0000000..493ff1b --- /dev/null +++ b/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml b/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml new file mode 100644 index 0000000..3dca3a1 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_resourceinspection_resourceinspection_annotation_1_0_1.xml b/.idea/libraries/Gradle__androidx_resourceinspection_resourceinspection_annotation_1_0_1.xml new file mode 100644 index 0000000..261fcc9 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_resourceinspection_resourceinspection_annotation_1_0_1.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_2_1_aar.xml b/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_2_1_aar.xml new file mode 100644 index 0000000..b71aaac --- /dev/null +++ b/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_2_1_aar.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_test_annotation_1_0_1_aar.xml b/.idea/libraries/Gradle__androidx_test_annotation_1_0_1_aar.xml new file mode 100644 index 0000000..bd8d922 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_test_annotation_1_0_1_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_test_core_1_5_0_aar.xml b/.idea/libraries/Gradle__androidx_test_core_1_5_0_aar.xml new file mode 100644 index 0000000..5322f49 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_test_core_1_5_0_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_5_1_aar.xml b/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_5_1_aar.xml new file mode 100644 index 0000000..711d443 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_5_1_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_5_1_aar.xml b/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_5_1_aar.xml new file mode 100644 index 0000000..4eb6896 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_5_1_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_5_aar.xml b/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_5_aar.xml new file mode 100644 index 0000000..e3200ba --- /dev/null +++ b/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_5_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_test_monitor_1_6_1_aar.xml b/.idea/libraries/Gradle__androidx_test_monitor_1_6_1_aar.xml new file mode 100644 index 0000000..67dd276 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_test_monitor_1_6_1_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_test_runner_1_5_2_aar.xml b/.idea/libraries/Gradle__androidx_test_runner_1_5_2_aar.xml new file mode 100644 index 0000000..305f718 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_test_runner_1_5_2_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_test_services_storage_1_4_2_aar.xml b/.idea/libraries/Gradle__androidx_test_services_storage_1_4_2_aar.xml new file mode 100644 index 0000000..a59ad9f --- /dev/null +++ b/.idea/libraries/Gradle__androidx_test_services_storage_1_4_2_aar.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_tracing_tracing_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_tracing_tracing_1_0_0_aar.xml new file mode 100644 index 0000000..ab9024c --- /dev/null +++ b/.idea/libraries/Gradle__androidx_tracing_tracing_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml b/.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml new file mode 100644 index 0000000..90a43ee --- /dev/null +++ b/.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml b/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml new file mode 100644 index 0000000..2413d3b --- /dev/null +++ b/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml b/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml new file mode 100644 index 0000000..7c98e8d --- /dev/null +++ b/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_1_aar.xml b/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_1_aar.xml new file mode 100644 index 0000000..4d0194c --- /dev/null +++ b/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_1_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml new file mode 100644 index 0000000..3b72ab2 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml b/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml new file mode 100644 index 0000000..247c402 --- /dev/null +++ b/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_android_material_material_1_11_0_aar.xml b/.idea/libraries/Gradle__com_google_android_material_material_1_11_0_aar.xml new file mode 100644 index 0000000..34ba5eb --- /dev/null +++ b/.idea/libraries/Gradle__com_google_android_material_material_1_11_0_aar.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_2.xml b/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_2.xml new file mode 100644 index 0000000..1e907fa --- /dev/null +++ b/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_2.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_google_guava_listenablefuture_1_0.xml b/.idea/libraries/Gradle__com_google_guava_listenablefuture_1_0.xml new file mode 100644 index 0000000..e33a216 --- /dev/null +++ b/.idea/libraries/Gradle__com_google_guava_listenablefuture_1_0.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1.xml b/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1.xml new file mode 100644 index 0000000..7612e94 --- /dev/null +++ b/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__javax_inject_javax_inject_1.xml b/.idea/libraries/Gradle__javax_inject_javax_inject_1.xml new file mode 100644 index 0000000..4578a9e --- /dev/null +++ b/.idea/libraries/Gradle__javax_inject_javax_inject_1.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__junit_junit_4_13_2.xml b/.idea/libraries/Gradle__junit_junit_4_13_2.xml new file mode 100644 index 0000000..bc47afd --- /dev/null +++ b/.idea/libraries/Gradle__junit_junit_4_13_2.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__me_relex_circleindicator_2_1_6_aar.xml b/.idea/libraries/Gradle__me_relex_circleindicator_2_1_6_aar.xml new file mode 100644 index 0000000..f514e6e --- /dev/null +++ b/.idea/libraries/Gradle__me_relex_circleindicator_2_1_6_aar.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 0000000..1e4cd45 --- /dev/null +++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3.xml new file mode 100644 index 0000000..45ba306 --- /dev/null +++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3.xml new file mode 100644 index 0000000..f0fd31f --- /dev/null +++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/app/UMC_6th.app.androidTest.iml b/.idea/modules/app/UMC_6th.app.androidTest.iml new file mode 100644 index 0000000..f703c13 --- /dev/null +++ b/.idea/modules/app/UMC_6th.app.androidTest.iml @@ -0,0 +1,158 @@ + + + + + + :app:main + + + + + + + + + + + + + + + + + + $USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.compose.compiler/compiler/1.5.1/2df7032eec187317f8ac0c565a733cea10f55e13/compiler-1.5.1.jar + + + + plugin:androidx.compose.plugins.idea:enabled=true + plugin:androidx.compose.compiler.plugins.kotlin:sourceInformation=true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/app/UMC_6th.app.iml b/.idea/modules/app/UMC_6th.app.iml new file mode 100644 index 0000000..da83eb9 --- /dev/null +++ b/.idea/modules/app/UMC_6th.app.iml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/app/UMC_6th.app.main.iml b/.idea/modules/app/UMC_6th.app.main.iml new file mode 100644 index 0000000..3cdca9a --- /dev/null +++ b/.idea/modules/app/UMC_6th.app.main.iml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + $USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.compose.compiler/compiler/1.5.1/2df7032eec187317f8ac0c565a733cea10f55e13/compiler-1.5.1.jar + + + + plugin:androidx.compose.plugins.idea:enabled=true + plugin:androidx.compose.compiler.plugins.kotlin:sourceInformation=true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/app/UMC_6th.app.unitTest.iml b/.idea/modules/app/UMC_6th.app.unitTest.iml new file mode 100644 index 0000000..ebf1744 --- /dev/null +++ b/.idea/modules/app/UMC_6th.app.unitTest.iml @@ -0,0 +1,133 @@ + + + + + + :app:main + + + + + + + + + + + + + + + + + + $USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.compose.compiler/compiler/1.5.1/2df7032eec187317f8ac0c565a733cea10f55e13/compiler-1.5.1.jar + + + plugin:androidx.compose.plugins.idea:enabled=true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UMC_6th/app/build.gradle.kts b/UMC_6th/app/build.gradle.kts index 71a2b9c..c9e012e 100644 --- a/UMC_6th/app/build.gradle.kts +++ b/UMC_6th/app/build.gradle.kts @@ -64,6 +64,8 @@ dependencies { implementation("androidx.compose.ui:ui-graphics") implementation("androidx.compose.ui:ui-tooling-preview") implementation("androidx.compose.material3:material3") + implementation("androidx.viewpager2:viewpager2:1.0.0") + implementation ("me.relex:circleindicator:2.1.6") testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumDetailFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumDetailFragment.kt new file mode 100644 index 0000000..e7ec667 --- /dev/null +++ b/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumDetailFragment.kt @@ -0,0 +1,22 @@ +package com.example.umc_6th + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment + + +class AlbumDetailFragment : Fragment() { + // 여기에 Fragment의 구현 내용을 작성합니다. + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // 여기에서 Fragment의 레이아웃을 인플레이트합니다. + return inflater.inflate(R.layout.fragment_album_detail, container, false) + } + + // 필요한 경우 다른 Fragment 생명주기 메소드를 오버라이드합니다. +} \ 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 857de24..0bc9fc1 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 @@ -1,30 +1,59 @@ package com.example.umc_6th +import android.content.Intent import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import androidx.fragment.app.Fragment +import androidx.fragment.app.FragmentManager +import androidx.fragment.app.FragmentPagerAdapter +import androidx.viewpager2.adapter.FragmentStateAdapter +import com.example.umc_6th.adapter.AlbumPagerAdapter +import com.example.umc_6th.databinding.FragmentAlbumBinding +import com.google.android.material.tabs.TabLayoutMediator -class AlbumFragment: Fragment() { +class AlbumFragment: Fragment(R.layout.fragment_album) { // 여기에 Fragment의 구현 내용을 작성합니다. + + private var _binding: FragmentAlbumBinding? = null + private val binding get() = _binding!! override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { - val view = inflater.inflate(R.layout.fragment_album, container, false) + _binding = FragmentAlbumBinding.inflate(inflater, container, false) + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) // 뒤로가기 이미지 뷰에 클릭 리스너 설정 - val albumBackIv = view.findViewById(R.id.album_back_iv) - albumBackIv.setOnClickListener { + binding.albumBackIv.setOnClickListener { // 이전 프래그먼트로 돌아가기 requireActivity().supportFragmentManager.popBackStack() } - return view + val adapter = AlbumPagerAdapter(this) + binding.albumViewPager.adapter = adapter + + TabLayoutMediator(binding.tlAlbum, binding.albumViewPager) { tab, position -> + tab.text = when (position) { + 0 -> "수록곡" + 1 -> "상세정보" + 2 -> "영상" + else -> null + } + }.attach() + } + + override fun onDestroyView() { + super.onDestroyView() + // 메모리 누수를 방지하기 위해 binding 객체를 null로 설정 + _binding = null } - // 필요한 경우 다른 Fragment 생명주기 메소드를 오버라이드합니다. } \ No newline at end of file diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumSongsFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumSongsFragment.kt new file mode 100644 index 0000000..c20392b --- /dev/null +++ b/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumSongsFragment.kt @@ -0,0 +1,55 @@ +package com.example.umc_6th + +import android.content.Intent +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment +import com.example.umc_6th.databinding.FragmentAlbumBinding +import com.example.umc_6th.databinding.FragmentAlbumSongsBinding + +class AlbumSongsFragment : Fragment(R.layout.fragment_album_songs) { + private var _binding: FragmentAlbumSongsBinding? = null + private val binding get() = _binding!! + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + _binding = FragmentAlbumSongsBinding.inflate(inflater, container, false) + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + // 취향 mix 이미지 변경 + binding.imgSongMixOffTag.setOnClickListener(){ + binding.imgSongMixOffTag.visibility=View.GONE + binding.imgSongMixOnTag.visibility=View.VISIBLE + } + binding.imgSongMixOnTag.setOnClickListener(){ + binding.imgSongMixOnTag.visibility=View.GONE + binding.imgSongMixOffTag.visibility=View.VISIBLE + } + + binding.imgSongPlay01.setOnClickListener(){ + goToSongActivity(binding.txSongTitle01.text.toString(), binding.txSongArtist01.text.toString()) + } + } + + private fun goToSongActivity(songTitle: String, songArtist: String) { + val intent = Intent(activity, SongActivity::class.java).apply { + putExtra("songTitle", songTitle) + putExtra("songArtist", songArtist) + } + startActivity(intent) + } + + override fun onDestroyView() { + super.onDestroyView() + // 메모리 누수를 방지하기 위해 binding 객체를 null로 설정 + _binding = null + } +} \ No newline at end of file diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumVideoFragment.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumVideoFragment.kt new file mode 100644 index 0000000..34d89ec --- /dev/null +++ b/UMC_6th/app/src/main/java/com/example/umc_6th/AlbumVideoFragment.kt @@ -0,0 +1,21 @@ +package com.example.umc_6th + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment + +class AlbumVideoFragment : Fragment() { + // 여기에 Fragment의 구현 내용을 작성합니다. + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // 여기에서 Fragment의 레이아웃을 인플레이트합니다. + return inflater.inflate(R.layout.fragment_album_video, container, false) + } + + // 필요한 경우 다른 Fragment 생명주기 메소드를 오버라이드합니다. +} \ No newline at end of file diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/FragmentHomeMainBanner.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/FragmentHomeMainBanner.kt new file mode 100644 index 0000000..55fd0d2 --- /dev/null +++ b/UMC_6th/app/src/main/java/com/example/umc_6th/FragmentHomeMainBanner.kt @@ -0,0 +1,21 @@ +package com.example.umc_6th + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment + +class FragmentHomeMainBanner : Fragment() { + // 여기에 Fragment의 구현 내용을 작성합니다. + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // 여기에서 Fragment의 레이아웃을 인플레이트합니다. + return inflater.inflate(R.layout.fragment_home_main_banner, container, false) + } + + // 필요한 경우 다른 Fragment 생명주기 메소드를 오버라이드합니다. +} \ No newline at end of file diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/FragmentHomeMainBanner2.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/FragmentHomeMainBanner2.kt new file mode 100644 index 0000000..10f2b85 --- /dev/null +++ b/UMC_6th/app/src/main/java/com/example/umc_6th/FragmentHomeMainBanner2.kt @@ -0,0 +1,21 @@ +package com.example.umc_6th + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment + +class FragmentHomeMainBanner2 : Fragment() { + // 여기에 Fragment의 구현 내용을 작성합니다. + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // 여기에서 Fragment의 레이아웃을 인플레이트합니다. + return inflater.inflate(R.layout.fragment_home_main_banner2, container, false) + } + + // 필요한 경우 다른 Fragment 생명주기 메소드를 오버라이드합니다. +} \ No newline at end of file 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/HomeFragment.kt index e52b26f..628ba58 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/HomeFragment.kt @@ -1,32 +1,86 @@ package com.example.umc_6th + import android.os.Bundle +import android.os.Handler import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.ImageView import androidx.fragment.app.Fragment -import com.example.umc_6th.databinding.ActivityMainBinding +import androidx.viewpager2.adapter.FragmentStateAdapter +import androidx.viewpager2.widget.ViewPager2 +import com.example.umc_6th.adapter.HomePagerAdapter +import com.example.umc_6th.adapter.ViewPagerAdapter import com.example.umc_6th.databinding.FragmentHomeBinding +import me.relex.circleindicator.CircleIndicator3 +import android.os.Looper + class HomeFragment : Fragment() { // 여기에 Fragment의 구현 내용을 작성합니다. + private var _binding: FragmentHomeBinding? = null + private val binding get() = _binding!! + private lateinit var handler: Handler + private lateinit var runnable: Runnable override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { - val view = inflater.inflate(R.layout.fragment_home, container, false) + _binding = FragmentHomeBinding.inflate(inflater, container, false) + + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) - val imgSecondAlbum1 = view.findViewById(R.id.imgSecondAlbum1) - imgSecondAlbum1.setOnClickListener { + binding.imgSecondAlbum1.setOnClickListener { val transaction = requireActivity().supportFragmentManager.beginTransaction() transaction.replace(R.id.main_container, AlbumFragment()) transaction.addToBackStack(null) // 백 스택에 추가 transaction.commit() } + val adapter = ViewPagerAdapter(this) + binding.homeViewPager.adapter = adapter - return view + val mainAdapter = HomePagerAdapter.HomeMainViewPagerAdapter(this) + val viewpager: ViewPager2 = binding.homeMainViewPager + viewpager.adapter = mainAdapter + + val indicator: CircleIndicator3 = binding.indicator + indicator.setViewPager(viewpager) + + // Handler 및 Runnable 설정 + handler = Handler(Looper.getMainLooper()) + runnable = object : Runnable { + override fun run() { + val itemCount = adapter.itemCount + val nextItem = (binding.homeMainViewPager.currentItem + 1) % itemCount + binding.homeMainViewPager.currentItem = nextItem + handler.postDelayed(this, 3000) // 3초 후에 다음 페이지로 넘어감 + } } + startAutoSlide() + } + + private fun startAutoSlide() { + handler.postDelayed(runnable, 3000) // 3초에 한번씩 페이지 이동 + } + + private fun stopAutoSlide() { + handler.removeCallbacks(runnable) // 자동 슬라이드 중지 + } + + override fun onDestroyView() { + super.onDestroyView() + stopAutoSlide() // 뷰가 사라질 때 자동 슬라이드 중지 + _binding = null + } + + + + class FragmentHomeBanner : Fragment(R.layout.fragment_home_banner1) { + // 필요한 경우 여기에 로직 추가 } - // 필요한 경우 다른 Fragment 생명주기 메소드를 오버라이드합니다. +} 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 800fb46..b1363e3 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 @@ -2,9 +2,11 @@ package com.example.umc_6th import android.app.Activity import android.content.Intent +import android.graphics.PorterDuff import android.os.Bundle import android.os.PersistableBundle import androidx.appcompat.app.AppCompatActivity +import androidx.compose.ui.graphics.Color import com.example.umc_6th.databinding.ActivitySongBinding class SongActivity : AppCompatActivity() { @@ -21,6 +23,21 @@ class SongActivity : AppCompatActivity() { binding.txSongTitle.text = songTitle binding.txSongArtist.text = songArtist + binding.imgSongRandom.setOnClickListener(){ + if (binding.imgSongRandom.colorFilter != null) { + binding.imgSongRandom.clearColorFilter() + } else { + binding.imgSongRandom.setColorFilter(R.color.flo, PorterDuff.Mode.SRC_IN) + } + } + binding.imgSongRepeat.setOnClickListener(){ + if (binding.imgSongRepeat.colorFilter != null) { + binding.imgSongRepeat.clearColorFilter() + } else { + binding.imgSongRepeat.setColorFilter(R.color.flo, PorterDuff.Mode.SRC_IN) + } + } + binding.imgSongDown.setOnClickListener { val returnIntent = Intent().apply { putExtra("albumTitle", "LILAC") diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/adapter/AlbumPagerAdapter.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/adapter/AlbumPagerAdapter.kt new file mode 100644 index 0000000..166e94b --- /dev/null +++ b/UMC_6th/app/src/main/java/com/example/umc_6th/adapter/AlbumPagerAdapter.kt @@ -0,0 +1,28 @@ +package com.example.umc_6th.adapter + +import androidx.fragment.app.Fragment +import androidx.viewpager2.adapter.FragmentStateAdapter +import com.example.umc_6th.AlbumDetailFragment +import com.example.umc_6th.AlbumSongsFragment +import com.example.umc_6th.AlbumVideoFragment +import com.example.umc_6th.HomeFragment + + +class AlbumPagerAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) { + private val fragments = listOf( + AlbumSongsFragment(), + AlbumDetailFragment(), + AlbumVideoFragment() + ) + + override fun getItemCount(): Int = fragments.size + + override fun createFragment(position: Int): Fragment = fragments[position] + +} + +class ViewPagerAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) { + private val fragments = arrayOf(HomeFragment.FragmentHomeBanner()) + override fun getItemCount(): Int = fragments.size + override fun createFragment(position: Int): Fragment = fragments[position] +} \ No newline at end of file diff --git a/UMC_6th/app/src/main/java/com/example/umc_6th/adapter/HomePagerAdapter.kt b/UMC_6th/app/src/main/java/com/example/umc_6th/adapter/HomePagerAdapter.kt new file mode 100644 index 0000000..f825c70 --- /dev/null +++ b/UMC_6th/app/src/main/java/com/example/umc_6th/adapter/HomePagerAdapter.kt @@ -0,0 +1,19 @@ +package com.example.umc_6th.adapter + +import androidx.fragment.app.Fragment +import androidx.viewpager2.adapter.FragmentStateAdapter +import com.example.umc_6th.FragmentHomeMainBanner +import com.example.umc_6th.FragmentHomeMainBanner2 + +class HomePagerAdapter { + class HomeMainViewPagerAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) { + private val fragments = listOf( + FragmentHomeMainBanner(), + FragmentHomeMainBanner2() + ) + + override fun getItemCount(): Int = fragments.size + + override fun createFragment(position: Int): Fragment = fragments[position] + } +} diff --git a/UMC_6th/app/src/main/res/layout/fragment_album.xml b/UMC_6th/app/src/main/res/layout/fragment_album.xml index 32bfc18..c388b5c 100644 --- a/UMC_6th/app/src/main/res/layout/fragment_album.xml +++ b/UMC_6th/app/src/main/res/layout/fragment_album.xml @@ -1,718 +1,182 @@ - + android:background="@color/white"> + + + + + - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/album_back_iv" /> + + + + + + + - + - + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - \ No newline at end of file + \ No newline at end of file diff --git a/UMC_6th/app/src/main/res/layout/fragment_album_detail.xml b/UMC_6th/app/src/main/res/layout/fragment_album_detail.xml new file mode 100644 index 0000000..77d9ef6 --- /dev/null +++ b/UMC_6th/app/src/main/res/layout/fragment_album_detail.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/UMC_6th/app/src/main/res/layout/fragment_album_songs.xml b/UMC_6th/app/src/main/res/layout/fragment_album_songs.xml new file mode 100644 index 0000000..3c0cbed --- /dev/null +++ b/UMC_6th/app/src/main/res/layout/fragment_album_songs.xml @@ -0,0 +1,549 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UMC_6th/app/src/main/res/layout/fragment_album_video.xml b/UMC_6th/app/src/main/res/layout/fragment_album_video.xml new file mode 100644 index 0000000..77d9ef6 --- /dev/null +++ b/UMC_6th/app/src/main/res/layout/fragment_album_video.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/UMC_6th/app/src/main/res/layout/fragment_home.xml b/UMC_6th/app/src/main/res/layout/fragment_home.xml index 75ede1e..4eb2599 100644 --- a/UMC_6th/app/src/main/res/layout/fragment_home.xml +++ b/UMC_6th/app/src/main/res/layout/fragment_home.xml @@ -11,161 +11,68 @@ android:layout_height="match_parent"> + - - - - - - - - - - - - + android:layout_height="30dp" + app:ci_drawable="@color/flo" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/homeMainViewPager" /> - + - - + android:id="@+id/imgMainMic" + android:layout_width="35dp" + android:layout_height="35dp" + android:src="@drawable/btn_main_mike" /> - - - - + android:id="@+id/imgMainTicket" + android:layout_width="50dp" + android:layout_height="35dp" + android:src="@drawable/btn_main_ticket" /> - - - - + android:id="@+id/imgMainSetting" + android:layout_width="35dp" + android:layout_height="35dp" + android:src="@drawable/btn_main_setting" /> + - + app:layout_constraintTop_toBottomOf="@id/indicator"> @@ -280,8 +187,8 @@ android:layout_height="wrap_content" android:layout_marginTop="10dp" android:text="제목" - android:textStyle="bold" android:textSize="18sp" + android:textStyle="bold" app:layout_constraintStart_toStartOf="@id/imgSecondAlbum2" app:layout_constraintTop_toBottomOf="@id/imgSecondAlbum2" /> @@ -316,8 +223,8 @@ android:layout_height="wrap_content" android:layout_marginTop="10dp" android:text="제목" - android:textStyle="bold" android:textSize="18sp" + android:textStyle="bold" app:layout_constraintStart_toStartOf="@id/imgSecondAlbum3" app:layout_constraintTop_toBottomOf="@id/imgSecondAlbum3" /> @@ -336,25 +243,24 @@ - + + app:layout_constraintTop_toBottomOf="@id/homeViewPager"> + + + + \ No newline at end of file diff --git a/UMC_6th/app/src/main/res/layout/fragment_home_banner2.xml b/UMC_6th/app/src/main/res/layout/fragment_home_banner2.xml new file mode 100644 index 0000000..8c630bd --- /dev/null +++ b/UMC_6th/app/src/main/res/layout/fragment_home_banner2.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/UMC_6th/app/src/main/res/layout/fragment_home_main_banner.xml b/UMC_6th/app/src/main/res/layout/fragment_home_main_banner.xml new file mode 100644 index 0000000..9a2a4cd --- /dev/null +++ b/UMC_6th/app/src/main/res/layout/fragment_home_main_banner.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UMC_6th/app/src/main/res/layout/fragment_home_main_banner2.xml b/UMC_6th/app/src/main/res/layout/fragment_home_main_banner2.xml new file mode 100644 index 0000000..2909981 --- /dev/null +++ b/UMC_6th/app/src/main/res/layout/fragment_home_main_banner2.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UMC_6th/app/src/main/res/layout/fragment_locker.xml b/UMC_6th/app/src/main/res/layout/fragment_locker.xml index 77d9ef6..55ce1d0 100644 --- a/UMC_6th/app/src/main/res/layout/fragment_locker.xml +++ b/UMC_6th/app/src/main/res/layout/fragment_locker.xml @@ -1,6 +1,60 @@ + + + + + + + + + + + + + + + \ No newline at end of file