From 77bc7823e2f554b6ad8db152ad5c404cafc13d6f Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Tue, 9 Jul 2024 18:23:15 +0900 Subject: [PATCH 01/25] =?UTF-8?q?[feature/#7]=20=EC=A7=81=EA=B4=80=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=EB=A9=94=EC=9D=B8=EB=B7=B0=201=EC=B0=A8?= =?UTF-8?q?=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 4 + .../caches-jvm/inputs/source-to-output.tab | Bin 4096 -> 4096 bytes .../inputs/source-to-output.tab.values.at | Bin 1168 -> 1038 bytes .../jvm/kotlin/class-attributes.tab | Bin 4096 -> 4096 bytes .../jvm/kotlin/class-attributes.tab.values.at | Bin 85 -> 82 bytes .../jvm/kotlin/class-fq-name-to-source.tab | Bin 4096 -> 4096 bytes .../class-fq-name-to-source.tab.values.at | Bin 615 -> 570 bytes .../caches-jvm/jvm/kotlin/constants.tab | Bin 4096 -> 4096 bytes .../jvm/kotlin/constants.tab.values.at | Bin 8381 -> 8219 bytes .../jvm/kotlin/internal-name-to-source.tab | Bin 4096 -> 4096 bytes .../internal-name-to-source.tab.values.at | Bin 663 -> 618 bytes .../cacheable/caches-jvm/jvm/kotlin/proto.tab | Bin 4096 -> 4096 bytes .../caches-jvm/jvm/kotlin/proto.tab.values.at | Bin 5036 -> 4575 bytes .../jvm/kotlin/source-to-classes.tab | Bin 4096 -> 4096 bytes .../kotlin/source-to-classes.tab.values.at | Bin 342 -> 315 bytes .../cacheable/caches-jvm/lookups/counters.tab | 2 +- .../caches-jvm/lookups/file-to-id.tab | Bin 4096 -> 4096 bytes .../lookups/file-to-id.tab.values.at | Bin 73 -> 67 bytes .../caches-jvm/lookups/id-to-file.tab | Bin 4096 -> 4096 bytes .../lookups/id-to-file.tab.keystream | Bin 4096 -> 4096 bytes .../lookups/id-to-file.tab.keystream.len | Bin 8 -> 8 bytes .../caches-jvm/lookups/id-to-file.tab.len | Bin 8 -> 8 bytes .../lookups/id-to-file.tab.values.at | Bin 231 -> 186 bytes .../caches-jvm/lookups/id-to-file.tab_i | Bin 32768 -> 32768 bytes .../cacheable/caches-jvm/lookups/lookups.tab | Bin 4096 -> 4096 bytes .../caches-jvm/lookups/lookups.tab.values.at | Bin 640 -> 619 bytes .../compileKotlin/cacheable/last-build.bin | Bin 18 -> 18 bytes .../local-state/build-history.bin | Bin 113 -> 31 bytes .../seatReview/ReviewMainActivity.kt | 15 ++ .../src/main/res/drawable/ic_chevron_down.xml | 10 + .../src/main/res/drawable/ic_chevron_left.xml | 10 + .../src/main/res/drawable/ic_pencil.xml | 12 + .../src/main/res/drawable/ic_plus.xml | 9 + .../shape_gray_fill_gray_line_raduis12.xml | 9 + .../res/drawable/shape_gray_fill_radius16.xml | 6 + .../res/drawable/shape_gray_fill_radius30.xml | 6 + .../res/drawable/shape_gray_fill_raduis6.xml | 6 + .../main/res/layout/activity_review_main.xml | 254 ++++++++++++++++++ presentation/src/main/res/values/themes.xml | 12 +- "\353\254\264\354\240\234" | 2 +- 40 files changed, 354 insertions(+), 3 deletions(-) create mode 100644 presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt create mode 100644 presentation/src/main/res/drawable/ic_chevron_down.xml create mode 100644 presentation/src/main/res/drawable/ic_chevron_left.xml create mode 100644 presentation/src/main/res/drawable/ic_pencil.xml create mode 100644 presentation/src/main/res/drawable/ic_plus.xml create mode 100644 presentation/src/main/res/drawable/shape_gray_fill_gray_line_raduis12.xml create mode 100644 presentation/src/main/res/drawable/shape_gray_fill_radius16.xml create mode 100644 presentation/src/main/res/drawable/shape_gray_fill_radius30.xml create mode 100644 presentation/src/main/res/drawable/shape_gray_fill_raduis6.xml create mode 100644 presentation/src/main/res/layout/activity_review_main.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9c16adc4..1d0076bc 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -24,6 +24,10 @@ + + \ No newline at end of file diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab index 46efa9bcd3d907a24ee31768e5e1917af0c55746..1fb0f45dc6c6edd748151758a02e99ea5ebd0e3c 100644 GIT binary patch delta 54 xcmZorXi#9C?X#PYVIr%(Bm)pILNSO90?a_nI?>mirTEYP{~H&^^G__`1OWHO3qAk< delta 54 ycmZorXi#9C?X#PYaU!d}Br^j810xgzDKG$uaZL1eXZiU1|No5(I?>mh@!ZDNYJLE=fCriY delta 48 scmZorXi#9C?X#PYaU!d}BohMz10xgzDKOv$k`fbr%^BBjY^~-80JdZYe*gdg diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at index f5ff014ccde07c8bc586132a0e3793c13b166ca4..85c1ebae5f6208d2e58e968640777cc3573a591f 100644 GIT binary patch delta 4 LcmWFynh*p41Hb`_ delta 8 PcmWFvoe;##$iM&q3G@Mu diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab index 794bdec3fa26889bd142d304d7e7274c92260772..f2f2ed31fdf14acd6aa7c60cb62de5621620370f 100644 GIT binary patch delta 49 rcmZorXi#9C?X#PYVIr%(Bm)pILNSO90^C3>I?>mh>D>Q~ZB_gL!CeTN delta 49 tcmZorXi#9C?X#PYaU!d}Br^j810xgzDKOv$l9CgB&6$q=-Pl&e4*utR1BCzp diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab index 29bb04388f9c5981b2ef20640aa0899e96fe1c10..0e566ff7dd35bd37856110c914e0e5f00833d019 100644 GIT binary patch delta 134 zcmZorXi#9C?X#PYVIr%(Bm)pILNSO90^C5XIMLTU7C0_jhzYj<+ PeE$Fc#)tC!6AL&2Tm3Np diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at index 799c1b85e3bba4527ab393ead98679e39bd0ca71..5eae8aad3357224b55ed7990fdae1c7cadbd611f 100644 GIT binary patch delta 14 Wcmdn%INM=@;be7%X&Wzx$O8Z_X$ArS delta 68 zcmbR3u-9>dA>)FHM#_c~49N`n47m(?3@Hq$3=zKWXJ=GgTyj{v?EZy MU}M!n`H6D>Q~ZB_gL!GZ{# delta 49 scmZorXi#9C?X#PYaU!d}BqIX@0}KP1V88<;B_{fsGfn-wv8{?90Kj+%WdHyG diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at index 191f9d9423416e0a169335b870ba6b0ed28a79c4..d7b68c59b6276e2546fdf559365ce7405165a282 100644 GIT binary patch delta 7 OcmbQv`if;k783vq&H|?Z delta 10 RcmaFGGM#lp7SlvST>uuT1C{^) diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab index 6ce236e56821f5ce4079630a3c855b8772e2a55b..a3043d590a10d54c16858a166a2b44fbc48e535d 100644 GIT binary patch delta 60 zcmZorXi#9C?X#PYVIr%(Bm)pILNSO90=z)1GSSzZ>D>Q`ZE-B&@BaVa_>rG~VgV-r DNl*@P delta 60 zcmZorXi#9C?X#PYX(Fq>BpU+*10xgzDKOv#l3Eje&6yP5O>B!}>3Z}3|HhB}{1Xc} E0YJ?S@c;k- diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at index be2589c327878157ca3a20bbd259dc11780554b4..38275b61adce62e8f2ebec06d880fc97d988a9fd 100644 GIT binary patch delta 7 OcmZ3ZeqVXReL(;YYXf!w delta 15 XcmcbwyheS)eZh@}(-IerFm diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab index 74a72836f6dc64de4771be3f94a2b299c7ccf61c..b9d62cb513e235707cdec09d5ca3a605683f77e5 100644 GIT binary patch delta 49 rcmZorXi#9C?X#PYVIr%(Bm)pILNSO90?a_nI?>mh>D>Q~ZB_gLz%>Yh delta 49 tcmZorXi#9C?X#PYaU!d}Br5|010xgzDKKCLl3Wvg&6$q;+t^mc4*X#f?Y1783D diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab index 26d3b094..c393a517 100644 --- a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab +++ b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab @@ -1,2 +1,2 @@ -4 +3 0 \ No newline at end of file diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab index 9259f7a8ecfc947c5d9c59635fedf5f4baa370d3..446aee8868c3dbaa90fe2c1d8758a55d1f35f252 100644 GIT binary patch delta 48 qcmZorXi#9C?X#PYVIr%(Bm)pILNSO90?a_nKGD~l@!ZDNYJLEY^~-80JZ@KdjJ3c diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at index 3e23c2afbb0619148c732de9f2b30b545a113e89..9f383b5fab9d5332f3a4a6ffa2b7645a6d9f8af6 100644 GIT binary patch delta 4 LcmeZtp5P1s15^QE delta 11 QcmZ?voZ!sH!Tu5S}O literal 4096 zcmeH@yAgmO5CzX)>e!T-&Da5bm}ngohwqJIiUsVOITkpMV2>@&T|^A3FUzw#g`_Hq z5Th5x?^VUD@%;22>V2xs2K~QhF0mJP(f_StW0W=qFn|FJU;qOczyJm?fB_6(00Tb^ E+|oA|zyJUM diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream index 6e7a9264288f38ee8207472c5349625584ec1699..636f34a3cbe33411309e4121964a67a0624882df 100644 GIT binary patch delta 15 WcmZorXi#8gU}V}T_?~~F0v`Y!t^>vZ delta 16 XcmZorXi#8bU}R$6DEOX#q5>}f9~cA4 diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len index eb529631c5a3c8b3de17f3b5aa25a95498f74e2e..29ce11cc9c2acfbfd357e04485500314b13afbb5 100644 GIT binary patch literal 8 LcmZQz00U+K01E&F literal 8 LcmZQz00R~P01N;H diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len index 93a595bd1bbabaf1bd4ee4909ac49e65e67fa3f4..a9f80ae0249093f1db8b14f71053acce35747e3d 100644 GIT binary patch literal 8 LcmZQz0D~C-0H6Sw literal 8 LcmZQz0D}bp0H^?= diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at index acf9feb3d60717e4968c89089b2ff6f958526248..0378c8778bec0a81eb7e2837bccfeb9b78019382 100644 GIT binary patch delta 6 NcmaFPxQlVZE&vKT0`33+ delta 9 QcmdnR_?&UVu8D@a02J&4-2eap diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i index 6936967cac95840ed14e6716e9ae347c2f5793da..e9905b3d28cac38891f28b92f61f50d5f90de08c 100644 GIT binary patch delta 43 lcmZo@U}|V!l4W3GU}iu99Y8iC5KjPNrj3T@>nA#h004Jx23G(8 delta 48 lcmZo@U}|V!Qe|KULL|@uWHSQs1R!Pt;u%29yixIXJphHM1`+@O diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab index f6cccf91a682dae566545e914b99adb6c34e56f8..0499c2adb75eae21c442896603c8521618cc83c6 100644 GIT binary patch delta 66 zcmZorXi%77BFO**j8F_?#{wBUC;G-SZTP=&-9AR4n1BEO>oGAfgaK)DARX{;a~)F? FF96Go5_kXr delta 66 zcmZorXi%77BFW6az`zK_Knl!`1=9N``o=R&`MYu5K1QM5zyJU1F)=WN{rmsl97wnQ K-CW1i#0vn=QWD4j diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at b/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at index 5e734a88be956dee7a88e59eab13f5492a65d679..673fce1eb168c831e531683ebd4eb194e5d4cbd8 100644 GIT binary patch delta 7 OcmZo*ea*5Vn+X65Gy;+U delta 29 ecmaFO(!jbQn@N=A4hI7R12fBcW-xUMOaTCBj0Hac diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin b/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin index fd0092e2dda3a53dfb8f4a11b6abc51e679d2788..70066ede57ccab5383f10df1c5adcef46ab0771e 100644 GIT binary patch literal 18 YcmZ4UmVvdLhk=1{!sPmm5ez^805(|!&Hw-a literal 18 YcmZ4UmVvdLhk=1{LY88d7y}Rh056LJz5oCK diff --git a/buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin b/buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin index 68940e82ca37e42da9fe6df7f5c1ca90343590bd..78f605a25e234435c3039442aec10052cfaa82b9 100644 GIT binary patch literal 31 dcmZ4UmVvcgk^ur385kHROs?M;0p&9=003aq1l#}s literal 113 zcmZ4UmVvcAn*jot7#J8Qcr#ioh4MiZRF+J5UF*lWg(>Xt{ jxFj*Jq?kd_CfLze*V*4MI3y_4ImAE64p|mx1`-zl43!#& diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt new file mode 100644 index 00000000..7f485620 --- /dev/null +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -0,0 +1,15 @@ +package com.depromeet.presentation.seatReview + +import android.os.Bundle +import com.depromeet.core.base.BaseActivity +import com.depromeet.presentation.databinding.ActivityReviewMainBinding +import dagger.hilt.android.AndroidEntryPoint + +@AndroidEntryPoint +class ReviewMainActivity : BaseActivity({ + ActivityReviewMainBinding.inflate(it) +}) { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + } +} diff --git a/presentation/src/main/res/drawable/ic_chevron_down.xml b/presentation/src/main/res/drawable/ic_chevron_down.xml new file mode 100644 index 00000000..20b83c5a --- /dev/null +++ b/presentation/src/main/res/drawable/ic_chevron_down.xml @@ -0,0 +1,10 @@ + + + diff --git a/presentation/src/main/res/drawable/ic_chevron_left.xml b/presentation/src/main/res/drawable/ic_chevron_left.xml new file mode 100644 index 00000000..84f3770c --- /dev/null +++ b/presentation/src/main/res/drawable/ic_chevron_left.xml @@ -0,0 +1,10 @@ + + + diff --git a/presentation/src/main/res/drawable/ic_pencil.xml b/presentation/src/main/res/drawable/ic_pencil.xml new file mode 100644 index 00000000..fdf54958 --- /dev/null +++ b/presentation/src/main/res/drawable/ic_pencil.xml @@ -0,0 +1,12 @@ + + + + diff --git a/presentation/src/main/res/drawable/ic_plus.xml b/presentation/src/main/res/drawable/ic_plus.xml new file mode 100644 index 00000000..feb7b21d --- /dev/null +++ b/presentation/src/main/res/drawable/ic_plus.xml @@ -0,0 +1,9 @@ + + + diff --git a/presentation/src/main/res/drawable/shape_gray_fill_gray_line_raduis12.xml b/presentation/src/main/res/drawable/shape_gray_fill_gray_line_raduis12.xml new file mode 100644 index 00000000..2259816e --- /dev/null +++ b/presentation/src/main/res/drawable/shape_gray_fill_gray_line_raduis12.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/presentation/src/main/res/drawable/shape_gray_fill_radius16.xml b/presentation/src/main/res/drawable/shape_gray_fill_radius16.xml new file mode 100644 index 00000000..fd967f3e --- /dev/null +++ b/presentation/src/main/res/drawable/shape_gray_fill_radius16.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/presentation/src/main/res/drawable/shape_gray_fill_radius30.xml b/presentation/src/main/res/drawable/shape_gray_fill_radius30.xml new file mode 100644 index 00000000..d655753e --- /dev/null +++ b/presentation/src/main/res/drawable/shape_gray_fill_radius30.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/presentation/src/main/res/drawable/shape_gray_fill_raduis6.xml b/presentation/src/main/res/drawable/shape_gray_fill_raduis6.xml new file mode 100644 index 00000000..9c2171f0 --- /dev/null +++ b/presentation/src/main/res/drawable/shape_gray_fill_raduis6.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/presentation/src/main/res/layout/activity_review_main.xml b/presentation/src/main/res/layout/activity_review_main.xml new file mode 100644 index 00000000..f92f4777 --- /dev/null +++ b/presentation/src/main/res/layout/activity_review_main.xml @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/presentation/src/main/res/values/themes.xml b/presentation/src/main/res/values/themes.xml index cb50f84c..7e7a2fbd 100644 --- a/presentation/src/main/res/values/themes.xml +++ b/presentation/src/main/res/values/themes.xml @@ -1,4 +1,4 @@ - + + + \ No newline at end of file diff --git "a/\353\254\264\354\240\234" "b/\353\254\264\354\240\234" index 0d0bcf8e..1fb37541 160000 --- "a/\353\254\264\354\240\234" +++ "b/\353\254\264\354\240\234" @@ -1 +1 @@ -Subproject commit 0d0bcf8ec527adce77f4150b3ea55af12156b5ab +Subproject commit 1fb375417e9775772350528383f061a3e5e07634 From cc9e72e833a29a651ab1cd8b73a3fa350dfc4514 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Tue, 9 Jul 2024 18:29:57 +0900 Subject: [PATCH 02/25] =?UTF-8?q?[feature/#7]=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20bottomsheet=20=EB=B0=8F=20=EA=B4=80=EB=A0=A8=20asse?= =?UTF-8?q?t=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seatReview/UploadDialogFragment.kt | 17 +++++++++++++++++ .../src/main/res/drawable/ic_camera.xml | 10 ++++++++++ presentation/src/main/res/drawable/ic_image.xml | 4 ++++ .../fragment_upload_method_bottom_sheet.xml | 6 ++++++ 4 files changed, 37 insertions(+) create mode 100644 presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt create mode 100644 presentation/src/main/res/drawable/ic_camera.xml create mode 100644 presentation/src/main/res/drawable/ic_image.xml create mode 100644 presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt new file mode 100644 index 00000000..96b8e21c --- /dev/null +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt @@ -0,0 +1,17 @@ +package com.depromeet.presentation.seatReview + +import android.os.Bundle +import android.view.View +import com.depromeet.core.base.BindingBottomSheetDialog +import com.depromeet.presentation.R +import com.depromeet.presentation.databinding.FragmentUploadMethodBottomSheetBinding + +class UploadDialogFragment : BindingBottomSheetDialog( + R.layout.fragment_upload_method_bottom_sheet, + FragmentUploadMethodBottomSheetBinding::inflate, +) { + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + } +} diff --git a/presentation/src/main/res/drawable/ic_camera.xml b/presentation/src/main/res/drawable/ic_camera.xml new file mode 100644 index 00000000..d9aed6fb --- /dev/null +++ b/presentation/src/main/res/drawable/ic_camera.xml @@ -0,0 +1,10 @@ + + + diff --git a/presentation/src/main/res/drawable/ic_image.xml b/presentation/src/main/res/drawable/ic_image.xml new file mode 100644 index 00000000..a8b409b1 --- /dev/null +++ b/presentation/src/main/res/drawable/ic_image.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml b/presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml new file mode 100644 index 00000000..77d9ef65 --- /dev/null +++ b/presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file From 38d3731f45cae8f8be98118e2d0259020906c130 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:02:18 +0900 Subject: [PATCH 03/25] =?UTF-8?q?[feature/#7]=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EB=8B=A8=20bottomSheet=20UI=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/res/drawable/ic_image.xml | 18 +++- .../drawable/shape_gray600_fill_radius12.xml | 6 ++ .../drawable/shape_white_fill_radius32.xml | 6 ++ .../fragment_upload_method_bottom_sheet.xml | 85 ++++++++++++++++++- 4 files changed, 110 insertions(+), 5 deletions(-) create mode 100644 presentation/src/main/res/drawable/shape_gray600_fill_radius12.xml create mode 100644 presentation/src/main/res/drawable/shape_white_fill_radius32.xml diff --git a/presentation/src/main/res/drawable/ic_image.xml b/presentation/src/main/res/drawable/ic_image.xml index a8b409b1..6acec9cd 100644 --- a/presentation/src/main/res/drawable/ic_image.xml +++ b/presentation/src/main/res/drawable/ic_image.xml @@ -1,4 +1,14 @@ - - - - \ No newline at end of file + + + + diff --git a/presentation/src/main/res/drawable/shape_gray600_fill_radius12.xml b/presentation/src/main/res/drawable/shape_gray600_fill_radius12.xml new file mode 100644 index 00000000..d6836f10 --- /dev/null +++ b/presentation/src/main/res/drawable/shape_gray600_fill_radius12.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/presentation/src/main/res/drawable/shape_white_fill_radius32.xml b/presentation/src/main/res/drawable/shape_white_fill_radius32.xml new file mode 100644 index 00000000..2717fc47 --- /dev/null +++ b/presentation/src/main/res/drawable/shape_white_fill_radius32.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml b/presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml index 77d9ef65..6d3b2dd9 100644 --- a/presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml +++ b/presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml @@ -1,6 +1,89 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_height="wrap_content" + android:background="@drawable/shape_white_fill_radius32"> + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 5b07584de5f8e52455ff902195a0827464c888a7 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:38:53 +0900 Subject: [PATCH 04/25] =?UTF-8?q?[feature/#7]=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EB=8B=A8=20bottomSheet=20shape=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/seatReview/ReviewMainActivity.kt | 6 ++++++ .../presentation/seatReview/UploadDialogFragment.kt | 8 ++++---- ...white_fill_radius32.xml => shape_white_fill_top32.xml} | 5 ++++- ..._bottom_sheet.xml => fragment_upload_bottom_sheet.xml} | 7 +++++-- 4 files changed, 19 insertions(+), 7 deletions(-) rename presentation/src/main/res/drawable/{shape_white_fill_radius32.xml => shape_white_fill_top32.xml} (67%) rename presentation/src/main/res/layout/{fragment_upload_method_bottom_sheet.xml => fragment_upload_bottom_sheet.xml} (92%) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index 7f485620..d7333232 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -3,6 +3,7 @@ package com.depromeet.presentation.seatReview import android.os.Bundle import com.depromeet.core.base.BaseActivity import com.depromeet.presentation.databinding.ActivityReviewMainBinding +import com.depromeet.presentation.extension.setOnSingleClickListener import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint @@ -11,5 +12,10 @@ class ReviewMainActivity : BaseActivity({ }) { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + + binding.btnAddPhoto.setOnSingleClickListener { + val uploadDialogFragment = UploadDialogFragment() + uploadDialogFragment.show(supportFragmentManager, uploadDialogFragment.tag) + } } } diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt index 96b8e21c..458fc6dc 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt @@ -4,11 +4,11 @@ import android.os.Bundle import android.view.View import com.depromeet.core.base.BindingBottomSheetDialog import com.depromeet.presentation.R -import com.depromeet.presentation.databinding.FragmentUploadMethodBottomSheetBinding +import com.depromeet.presentation.databinding.FragmentUploadBottomSheetBinding -class UploadDialogFragment : BindingBottomSheetDialog( - R.layout.fragment_upload_method_bottom_sheet, - FragmentUploadMethodBottomSheetBinding::inflate, +class UploadDialogFragment : BindingBottomSheetDialog( + R.layout.fragment_upload_bottom_sheet, + FragmentUploadBottomSheetBinding::inflate, ) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { diff --git a/presentation/src/main/res/drawable/shape_white_fill_radius32.xml b/presentation/src/main/res/drawable/shape_white_fill_top32.xml similarity index 67% rename from presentation/src/main/res/drawable/shape_white_fill_radius32.xml rename to presentation/src/main/res/drawable/shape_white_fill_top32.xml index 2717fc47..00d7a872 100644 --- a/presentation/src/main/res/drawable/shape_white_fill_radius32.xml +++ b/presentation/src/main/res/drawable/shape_white_fill_top32.xml @@ -1,6 +1,9 @@ - + + diff --git a/presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml b/presentation/src/main/res/layout/fragment_upload_bottom_sheet.xml similarity index 92% rename from presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml rename to presentation/src/main/res/layout/fragment_upload_bottom_sheet.xml index 6d3b2dd9..5fd06a77 100644 --- a/presentation/src/main/res/layout/fragment_upload_method_bottom_sheet.xml +++ b/presentation/src/main/res/layout/fragment_upload_bottom_sheet.xml @@ -1,9 +1,10 @@ - + android:background="@drawable/shape_white_fill_top32"> @@ -82,6 +84,7 @@ android:layout_height="wrap_content" android:layout_marginStart="12dp" android:text="갤러리에서 선택" + android:gravity="center" android:textColor="#4A4A4A" android:textSize="16sp" /> From 0e5c0db594d7e21fd55cb8274006011ffe7ba1b7 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Tue, 9 Jul 2024 20:50:50 +0900 Subject: [PATCH 05/25] =?UTF-8?q?[feature/#7]=20camera,=20gallery=20?= =?UTF-8?q?=EA=B6=8C=ED=95=9C=20=ED=97=88=EC=9A=A9=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1d0076bc..8b1ac4e8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,10 @@ + + + + Date: Tue, 9 Jul 2024 21:51:38 +0900 Subject: [PATCH 06/25] =?UTF-8?q?[feature/#7]=20datePicker=20=EB=82=A0?= =?UTF-8?q?=EC=A7=9C=20=EB=B3=80=EA=B2=BD=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compileKotlin/cacheable/last-build.bin | Bin 18 -> 18 bytes .../local-state/build-history.bin | Bin 31 -> 31 bytes .../seatReview/DatePickerDialogFragment.kt | 37 ++++++++++++++++++ .../seatReview/ReviewMainActivity.kt | 18 +++++++++ .../main/res/layout/activity_review_main.xml | 6 +-- .../fragment_date_picker_bottom_sheet.xml | 20 ++++++++++ 6 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt create mode 100644 presentation/src/main/res/layout/fragment_date_picker_bottom_sheet.xml diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin b/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin index 70066ede57ccab5383f10df1c5adcef46ab0771e..8648f0d2e7a5e8a103db94eda7612b69e16da0f2 100644 GIT binary patch literal 18 YcmZ4UmVvdLhk=1{!t};7HVi-j05+Wj(*OVf literal 18 YcmZ4UmVvdLhk=1{!sPmm5ez^805(|!&Hw-a diff --git a/buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin b/buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin index 78f605a25e234435c3039442aec10052cfaa82b9..daf1514ee82f90e658749d6da62a4d0da5e7e184 100644 GIT binary patch literal 31 dcmZ4UmVvcgk^ur385kHROm9461LZR?003by1mOSx literal 31 dcmZ4UmVvcgk^ur385kHROs?M;0p&9=003aq1l#}s diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt new file mode 100644 index 00000000..eddbeffd --- /dev/null +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt @@ -0,0 +1,37 @@ +package com.depromeet.presentation.seatReview + +import android.os.Bundle +import android.view.View +import com.depromeet.core.base.BindingBottomSheetDialog +import com.depromeet.presentation.R +import com.depromeet.presentation.databinding.FragmentDatePickerBottomSheetBinding +import java.util.Calendar + +class DatePickerDialogFragment : BindingBottomSheetDialog( + R.layout.fragment_date_picker_bottom_sheet, + FragmentDatePickerBottomSheetBinding::inflate, +) { + var onDateSelected: ((year: Int, month: Int, day: Int) -> Unit)? = null + private var selectedYear: Int = Calendar.getInstance().get(Calendar.YEAR) + private var selectedMonth: Int = Calendar.getInstance().get(Calendar.MONTH) + private var selectedDay: Int = Calendar.getInstance().get(Calendar.DAY_OF_MONTH) + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + + binding.datePicker.init( + selectedYear, + selectedMonth, + selectedDay, + ) { _, year, month, day -> + selectedYear = year + selectedMonth = month + selectedDay = day + } + } + + override fun onDestroyView() { + super.onDestroyView() + onDateSelected?.invoke(selectedYear, selectedMonth, selectedDay) + } +} diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index d7333232..d19e2085 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -5,6 +5,9 @@ import com.depromeet.core.base.BaseActivity import com.depromeet.presentation.databinding.ActivityReviewMainBinding import com.depromeet.presentation.extension.setOnSingleClickListener import dagger.hilt.android.AndroidEntryPoint +import java.text.SimpleDateFormat +import java.util.Calendar +import java.util.Locale @AndroidEntryPoint class ReviewMainActivity : BaseActivity({ @@ -17,5 +20,20 @@ class ReviewMainActivity : BaseActivity({ val uploadDialogFragment = UploadDialogFragment() uploadDialogFragment.show(supportFragmentManager, uploadDialogFragment.tag) } + + val today = Calendar.getInstance() + val dateFormat = SimpleDateFormat("yy.MM.dd", Locale.getDefault()) + binding.tvDate.text = dateFormat.format(today.time) + + binding.layoutDate.setOnSingleClickListener { + val datePickerDialogFragment = DatePickerDialogFragment().apply { + onDateSelected = { year, month, day -> + val selectedDate = Calendar.getInstance() + selectedDate.set(year, month, day) + binding.tvDate.text = dateFormat.format(selectedDate.time) + } + } + datePickerDialogFragment.show(supportFragmentManager, datePickerDialogFragment.tag) + } } } diff --git a/presentation/src/main/res/layout/activity_review_main.xml b/presentation/src/main/res/layout/activity_review_main.xml index f92f4777..31755ae1 100644 --- a/presentation/src/main/res/layout/activity_review_main.xml +++ b/presentation/src/main/res/layout/activity_review_main.xml @@ -1,9 +1,9 @@ - diff --git a/presentation/src/main/res/layout/fragment_date_picker_bottom_sheet.xml b/presentation/src/main/res/layout/fragment_date_picker_bottom_sheet.xml new file mode 100644 index 00000000..6789bfaa --- /dev/null +++ b/presentation/src/main/res/layout/fragment_date_picker_bottom_sheet.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file From 6f62e11b6d71b64bf0203b29b09f549b4b018ef7 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:04:33 +0900 Subject: [PATCH 07/25] =?UTF-8?q?[refactor/#7]=20ReviewMainActivity=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/seatReview/DatePickerDialogFragment.kt | 6 +----- .../depromeet/presentation/seatReview/ReviewMainActivity.kt | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt index eddbeffd..a342f5f4 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt @@ -19,11 +19,7 @@ class DatePickerDialogFragment : BindingBottomSheetDialog + binding.datePicker.init(selectedYear, selectedMonth, selectedDay,) { _, year, month, day -> selectedYear = year selectedMonth = month selectedDay = day diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index d19e2085..dd8f61c4 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -15,12 +15,18 @@ class ReviewMainActivity : BaseActivity({ }) { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + initUploadDialog() + initDatePickerDialog() + } + private fun initUploadDialog() { binding.btnAddPhoto.setOnSingleClickListener { val uploadDialogFragment = UploadDialogFragment() uploadDialogFragment.show(supportFragmentManager, uploadDialogFragment.tag) } + } + private fun initDatePickerDialog() { val today = Calendar.getInstance() val dateFormat = SimpleDateFormat("yy.MM.dd", Locale.getDefault()) binding.tvDate.text = dateFormat.format(today.time) From a7433119026895a8d97954fe6413b06fad38c465 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Tue, 9 Jul 2024 23:38:14 +0900 Subject: [PATCH 08/25] =?UTF-8?q?[feature/#7]=20=EC=A7=81=EA=B4=80=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=EB=A9=94=EC=9D=B8=EB=B7=B0=20=EC=A2=8C?= =?UTF-8?q?=EC=84=9D,=20=EB=82=B4=EC=9E=90=EB=A6=AC=20=ED=9B=84=EA=B8=B0?= =?UTF-8?q?=20=EB=93=B1=EB=A1=9D=20=EC=8B=9C=20text=20UI=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seatReview/ReviewMainActivity.kt | 1 - .../main/res/layout/activity_review_main.xml | 429 ++++++++++-------- 2 files changed, 249 insertions(+), 181 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index dd8f61c4..15bbd05a 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -30,7 +30,6 @@ class ReviewMainActivity : BaseActivity({ val today = Calendar.getInstance() val dateFormat = SimpleDateFormat("yy.MM.dd", Locale.getDefault()) binding.tvDate.text = dateFormat.format(today.time) - binding.layoutDate.setOnSingleClickListener { val datePickerDialogFragment = DatePickerDialogFragment().apply { onDateSelected = { year, month, day -> diff --git a/presentation/src/main/res/layout/activity_review_main.xml b/presentation/src/main/res/layout/activity_review_main.xml index 31755ae1..0d59b144 100644 --- a/presentation/src/main/res/layout/activity_review_main.xml +++ b/presentation/src/main/res/layout/activity_review_main.xml @@ -1,254 +1,323 @@ - - + + - - - + android:paddingStart="12dp" + android:textAlignment="center" + android:textColor="@color/black" + android:textSize="13sp" + tools:text="24.06.30" /> - + + + - - - + + android:layout_height="wrap_content" + android:layout_marginTop="24dp" + android:orientation="horizontal" + android:paddingHorizontal="16dp"> - + android:background="@drawable/shape_gray_fill_gray_line_raduis12" + android:paddingHorizontal="16dp" + android:paddingVertical="118dp" + android:src="@drawable/ic_plus" /> + + - - - - - - - + + + + + android:scaleType="centerCrop" + android:src="@drawable/ic_launcher_background" + android:visibility="gone" /> - + - + - + - + android:scaleType="centerCrop" + android:visibility="gone" /> - + - + - + - - - - - - - - - - + android:scaleType="centerCrop" + android:src="@drawable/ic_launcher_background" + android:visibility="gone" /> - + + + + + + + + + + + + + android:visibility="invisible" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/tv_stadium_name" + app:layout_constraintTop_toTopOf="parent"> + android:textSize="13sp" + tools:text="네이비석" /> - + android:layout_marginVertical="16dp" + android:layout_marginStart="5dp" + android:textSize="13sp" + tools:text="304" /> + + + + + + + + + + + + + + + + android:visibility="invisible" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/tv_review_my_seat" + app:layout_constraintTop_toTopOf="parent"> + android:textSize="13sp" + tools:text="3" /> - + android:layout_marginVertical="16dp" + android:text="개의 후기" + android:textSize="13sp" /> - - + app:layout_constraintTop_toTopOf="parent" /> + From a4b00e0674ad8120c95088b91b70231ef49afbd8 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 00:10:02 +0900 Subject: [PATCH 09/25] =?UTF-8?q?[feature/#7]=20=EC=A7=81=EA=B4=80=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=EB=A9=94=EC=9D=B8=EB=B7=B0=20=EC=97=85?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seatReview/DatePickerDialogFragment.kt | 2 + .../main/res/layout/activity_review_main.xml | 41 +++++++++++++------ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt index a342f5f4..03e157ac 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt @@ -5,8 +5,10 @@ import android.view.View import com.depromeet.core.base.BindingBottomSheetDialog import com.depromeet.presentation.R import com.depromeet.presentation.databinding.FragmentDatePickerBottomSheetBinding +import dagger.hilt.android.AndroidEntryPoint import java.util.Calendar +@AndroidEntryPoint class DatePickerDialogFragment : BindingBottomSheetDialog( R.layout.fragment_date_picker_bottom_sheet, FragmentDatePickerBottomSheetBinding::inflate, diff --git a/presentation/src/main/res/layout/activity_review_main.xml b/presentation/src/main/res/layout/activity_review_main.xml index 0d59b144..0927a2f3 100644 --- a/presentation/src/main/res/layout/activity_review_main.xml +++ b/presentation/src/main/res/layout/activity_review_main.xml @@ -61,7 +61,7 @@ + android:src="@drawable/ic_launcher_background" /> + android:src="@drawable/ic_launcher_background" /> + android:src="@drawable/ic_launcher_background" /> - + + From e78f9c061f9b0b88a7616fd3e9c37e7f394f0256 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 02:58:09 +0900 Subject: [PATCH 10/25] =?UTF-8?q?[feature/#7]=20=EA=B0=A4=EB=9F=AC?= =?UTF-8?q?=EB=A6=AC=20photo=20picker=20=EC=97=85=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seatReview/ReviewMainActivity.kt | 35 ++++++++- .../seatReview/UploadDialogFragment.kt | 22 ++++++ .../main/res/layout/activity_review_main.xml | 77 +++++++------------ 3 files changed, 82 insertions(+), 52 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index 15bbd05a..a1a08aaa 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -1,9 +1,12 @@ package com.depromeet.presentation.seatReview +import android.net.Uri import android.os.Bundle +import android.view.View +import android.widget.ImageView +import androidx.core.view.isVisible import com.depromeet.core.base.BaseActivity import com.depromeet.presentation.databinding.ActivityReviewMainBinding -import com.depromeet.presentation.extension.setOnSingleClickListener import dagger.hilt.android.AndroidEntryPoint import java.text.SimpleDateFormat import java.util.Calendar @@ -13,14 +16,19 @@ import java.util.Locale class ReviewMainActivity : BaseActivity({ ActivityReviewMainBinding.inflate(it) }) { + + private val imageViews: List by lazy { listOf(binding.ivFirstImage, binding.ivSecondImage, binding.ivThirdImage) } + private var selectedImageUris: MutableList = mutableListOf() + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) initUploadDialog() initDatePickerDialog() + setupFragmentResultListener() } private fun initUploadDialog() { - binding.btnAddPhoto.setOnSingleClickListener { + binding.btnAddPhoto.setOnClickListener { val uploadDialogFragment = UploadDialogFragment() uploadDialogFragment.show(supportFragmentManager, uploadDialogFragment.tag) } @@ -30,7 +38,7 @@ class ReviewMainActivity : BaseActivity({ val today = Calendar.getInstance() val dateFormat = SimpleDateFormat("yy.MM.dd", Locale.getDefault()) binding.tvDate.text = dateFormat.format(today.time) - binding.layoutDate.setOnSingleClickListener { + binding.layoutDate.setOnClickListener { val datePickerDialogFragment = DatePickerDialogFragment().apply { onDateSelected = { year, month, day -> val selectedDate = Calendar.getInstance() @@ -41,4 +49,25 @@ class ReviewMainActivity : BaseActivity({ datePickerDialogFragment.show(supportFragmentManager, datePickerDialogFragment.tag) } } + + private fun setupFragmentResultListener() { + supportFragmentManager.setFragmentResultListener("requestKey", this) { _, bundle -> + val newSelectedImages = bundle.getStringArrayList("selected_images") + newSelectedImages?.let { updateSelectedImages(it) } + } + } + + private fun updateSelectedImages(newImageUris: List) { + selectedImageUris.addAll(newImageUris) + binding.tvAddPhoto.isVisible = selectedImageUris.isEmpty() + + for ((index, uri) in selectedImageUris.withIndex()) { + if (index < imageViews.size) { + val imageView = imageViews[index] as ImageView + imageView.isVisible = true + imageView.setImageURI(Uri.parse(uri)) + } + } + binding.btnAddPhoto.isVisible = selectedImageUris.size < imageViews.size + } } diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt index 458fc6dc..b619f13c 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt @@ -2,16 +2,38 @@ package com.depromeet.presentation.seatReview import android.os.Bundle import android.view.View +import androidx.activity.result.ActivityResultLauncher +import androidx.activity.result.PickVisualMediaRequest +import androidx.activity.result.contract.ActivityResultContracts +import androidx.fragment.app.setFragmentResult import com.depromeet.core.base.BindingBottomSheetDialog import com.depromeet.presentation.R import com.depromeet.presentation.databinding.FragmentUploadBottomSheetBinding +import com.depromeet.presentation.extension.setOnSingleClickListener class UploadDialogFragment : BindingBottomSheetDialog( R.layout.fragment_upload_bottom_sheet, FragmentUploadBottomSheetBinding::inflate, ) { + private lateinit var pickMultipleMediaLauncher: ActivityResultLauncher + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + pickMultipleMediaLauncher = + registerForActivityResult(ActivityResultContracts.PickMultipleVisualMedia(3)) { uris -> + val uriList = uris.map { it.toString() } + val bundle = Bundle().apply { + putStringArrayList("selected_images", ArrayList(uriList)) + } + setFragmentResult("requestKey", bundle) + dismiss() + } + } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + binding.btnGallery.setOnSingleClickListener { + pickMultipleMediaLauncher.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly)) + } } } diff --git a/presentation/src/main/res/layout/activity_review_main.xml b/presentation/src/main/res/layout/activity_review_main.xml index 0927a2f3..9d6bc5cd 100644 --- a/presentation/src/main/res/layout/activity_review_main.xml +++ b/presentation/src/main/res/layout/activity_review_main.xml @@ -60,7 +60,7 @@ - - - - - - - - - + + + android:scaleType="centerCrop" + android:visibility="gone" /> - - - - - - - - - + android:layout_marginStart="8dp" + android:scaleType="centerCrop" + android:visibility="gone" /> - - - + From 65b222f0e1cdf72401ee9633cd50db9073d1c4d3 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 03:04:31 +0900 Subject: [PATCH 11/25] =?UTF-8?q?[feature/#7]=203=EB=B2=88=EC=A7=B8=20?= =?UTF-8?q?=EC=82=AC=EC=A7=84=20=EB=94=B0=EB=A1=9C=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EC=8B=9C=20scrollview=20=EC=9E=90=EB=8F=99=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/seatReview/ReviewMainActivity.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index a1a08aaa..7d7e1e03 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -63,9 +63,14 @@ class ReviewMainActivity : BaseActivity({ for ((index, uri) in selectedImageUris.withIndex()) { if (index < imageViews.size) { - val imageView = imageViews[index] as ImageView - imageView.isVisible = true - imageView.setImageURI(Uri.parse(uri)) + val image = imageViews[index] as ImageView + image.isVisible = true + image.setImageURI(Uri.parse(uri)) + } + } + if (selectedImageUris.size == 3) { + binding.svReviewPhoto.post { + binding.svReviewPhoto.fullScroll(View.FOCUS_RIGHT) } } binding.btnAddPhoto.isVisible = selectedImageUris.size < imageViews.size From 483c998bf91d771aca40fc688a426ebf1c6f5648 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 03:10:06 +0900 Subject: [PATCH 12/25] =?UTF-8?q?[refactor/#7]=20=EC=A7=81=EA=B4=80=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=EB=A9=94=EC=9D=B8=EB=B7=B0=20=EC=83=81?= =?UTF-8?q?=EC=88=98=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seatReview/ReviewMainActivity.kt | 58 +++++++++++-------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index 7d7e1e03..5bab76b9 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -17,9 +17,16 @@ class ReviewMainActivity : BaseActivity({ ActivityReviewMainBinding.inflate(it) }) { - private val imageViews: List by lazy { listOf(binding.ivFirstImage, binding.ivSecondImage, binding.ivThirdImage) } + private val imageViews: List by lazy { + listOf(binding.ivFirstImage, binding.ivSecondImage, binding.ivThirdImage) } private var selectedImageUris: MutableList = mutableListOf() + companion object { + private const val DATE_FORMAT = "yy.MM.dd" + private const val FRAGMENT_RESULT_KEY = "requestKey" + private const val SELECTED_IMAGES = "selected_images" + } + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) initUploadDialog() @@ -36,43 +43,46 @@ class ReviewMainActivity : BaseActivity({ private fun initDatePickerDialog() { val today = Calendar.getInstance() - val dateFormat = SimpleDateFormat("yy.MM.dd", Locale.getDefault()) - binding.tvDate.text = dateFormat.format(today.time) - binding.layoutDate.setOnClickListener { - val datePickerDialogFragment = DatePickerDialogFragment().apply { - onDateSelected = { year, month, day -> - val selectedDate = Calendar.getInstance() - selectedDate.set(year, month, day) - binding.tvDate.text = dateFormat.format(selectedDate.time) + val dateFormat = SimpleDateFormat(DATE_FORMAT, Locale.getDefault()) + with(binding) { + tvDate.text = dateFormat.format(today.time) + layoutDate.setOnClickListener { + val datePickerDialogFragment = DatePickerDialogFragment().apply { + onDateSelected = { year, month, day -> + val selectedDate = Calendar.getInstance() + selectedDate.set(year, month, day) + tvDate.text = dateFormat.format(selectedDate.time) + } } + datePickerDialogFragment.show(supportFragmentManager, datePickerDialogFragment.tag) } - datePickerDialogFragment.show(supportFragmentManager, datePickerDialogFragment.tag) } } private fun setupFragmentResultListener() { - supportFragmentManager.setFragmentResultListener("requestKey", this) { _, bundle -> - val newSelectedImages = bundle.getStringArrayList("selected_images") + supportFragmentManager.setFragmentResultListener(FRAGMENT_RESULT_KEY, this) { _, bundle -> + val newSelectedImages = bundle.getStringArrayList(SELECTED_IMAGES) newSelectedImages?.let { updateSelectedImages(it) } } } private fun updateSelectedImages(newImageUris: List) { selectedImageUris.addAll(newImageUris) - binding.tvAddPhoto.isVisible = selectedImageUris.isEmpty() - - for ((index, uri) in selectedImageUris.withIndex()) { - if (index < imageViews.size) { - val image = imageViews[index] as ImageView - image.isVisible = true - image.setImageURI(Uri.parse(uri)) + with(binding) { + tvAddPhoto.isVisible = selectedImageUris.isEmpty() + for ((index, uri) in selectedImageUris.withIndex()) { + if (index < imageViews.size) { + val image = imageViews[index] as ImageView + image.isVisible = true + image.setImageURI(Uri.parse(uri)) + } } - } - if (selectedImageUris.size == 3) { - binding.svReviewPhoto.post { - binding.svReviewPhoto.fullScroll(View.FOCUS_RIGHT) + if (selectedImageUris.size == 3) { + svReviewPhoto.post { + svReviewPhoto.fullScroll(View.FOCUS_RIGHT) + } } + btnAddPhoto.isVisible = selectedImageUris.size < imageViews.size } - binding.btnAddPhoto.isVisible = selectedImageUris.size < imageViews.size } } From b3acfb627fcbdc4555bdcb28fbed4ca577ff8765 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 03:12:28 +0900 Subject: [PATCH 13/25] =?UTF-8?q?[refactor/#7]=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20dialog=20=EC=83=81=EC=88=98=ED=99=94=20=EB=B0=8F=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/seatReview/ReviewMainActivity.kt | 6 ++++-- .../seatReview/UploadDialogFragment.kt | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index 5bab76b9..be975f77 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -7,6 +7,7 @@ import android.widget.ImageView import androidx.core.view.isVisible import com.depromeet.core.base.BaseActivity import com.depromeet.presentation.databinding.ActivityReviewMainBinding +import com.depromeet.presentation.extension.setOnSingleClickListener import dagger.hilt.android.AndroidEntryPoint import java.text.SimpleDateFormat import java.util.Calendar @@ -18,7 +19,7 @@ class ReviewMainActivity : BaseActivity({ }) { private val imageViews: List by lazy { - listOf(binding.ivFirstImage, binding.ivSecondImage, binding.ivThirdImage) } + listOf(binding.ivFirstImage, binding.ivSecondImage, binding.ivThirdImage)} private var selectedImageUris: MutableList = mutableListOf() companion object { @@ -32,6 +33,7 @@ class ReviewMainActivity : BaseActivity({ initUploadDialog() initDatePickerDialog() setupFragmentResultListener() + } private fun initUploadDialog() { @@ -46,7 +48,7 @@ class ReviewMainActivity : BaseActivity({ val dateFormat = SimpleDateFormat(DATE_FORMAT, Locale.getDefault()) with(binding) { tvDate.text = dateFormat.format(today.time) - layoutDate.setOnClickListener { + layoutDate.setOnSingleClickListener { val datePickerDialogFragment = DatePickerDialogFragment().apply { onDateSelected = { year, month, day -> val selectedDate = Calendar.getInstance() diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt index b619f13c..05f0935a 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt @@ -15,17 +15,27 @@ class UploadDialogFragment : BindingBottomSheetDialog override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + setupPickMultipleMediaLauncher() + } + + private fun setupPickMultipleMediaLauncher() { pickMultipleMediaLauncher = registerForActivityResult(ActivityResultContracts.PickMultipleVisualMedia(3)) { uris -> val uriList = uris.map { it.toString() } val bundle = Bundle().apply { - putStringArrayList("selected_images", ArrayList(uriList)) + putStringArrayList(SELECTED_IMAGES, ArrayList(uriList)) } - setFragmentResult("requestKey", bundle) + setFragmentResult(REQUEST_KEY, bundle) dismiss() } } From 876b668f24b42829e5187f959b53b24e5e730641 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 04:19:56 +0900 Subject: [PATCH 14/25] =?UTF-8?q?[feature/#7]=20=EC=82=AC=EC=A7=84=20?= =?UTF-8?q?=EC=B4=AC=EC=98=81=20=EC=82=AC=EC=A7=84=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seatReview/ReviewMainActivity.kt | 22 ++++++++--- .../seatReview/UploadDialogFragment.kt | 39 +++++++++++++++++++ 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index be975f77..26d33dcc 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -19,7 +19,8 @@ class ReviewMainActivity : BaseActivity({ }) { private val imageViews: List by lazy { - listOf(binding.ivFirstImage, binding.ivSecondImage, binding.ivThirdImage)} + listOf(binding.ivFirstImage, binding.ivSecondImage, binding.ivThirdImage) + } private var selectedImageUris: MutableList = mutableListOf() companion object { @@ -33,7 +34,6 @@ class ReviewMainActivity : BaseActivity({ initUploadDialog() initDatePickerDialog() setupFragmentResultListener() - } private fun initUploadDialog() { @@ -64,12 +64,20 @@ class ReviewMainActivity : BaseActivity({ private fun setupFragmentResultListener() { supportFragmentManager.setFragmentResultListener(FRAGMENT_RESULT_KEY, this) { _, bundle -> val newSelectedImages = bundle.getStringArrayList(SELECTED_IMAGES) - newSelectedImages?.let { updateSelectedImages(it) } + newSelectedImages?.let { addSelectedImages(it) } } } - private fun updateSelectedImages(newImageUris: List) { - selectedImageUris.addAll(newImageUris) + private fun addSelectedImages(newImageUris: List) { + for (uri in newImageUris) { + if (!selectedImageUris.contains(uri)) { + selectedImageUris.add(uri) + } + } + updateImageViews() + } + + private fun updateImageViews() { with(binding) { tvAddPhoto.isVisible = selectedImageUris.isEmpty() for ((index, uri) in selectedImageUris.withIndex()) { @@ -79,6 +87,10 @@ class ReviewMainActivity : BaseActivity({ image.setImageURI(Uri.parse(uri)) } } + for (index in selectedImageUris.size until imageViews.size) { + val image = imageViews[index] as ImageView + image.isVisible = false + } if (selectedImageUris.size == 3) { svReviewPhoto.post { svReviewPhoto.fullScroll(View.FOCUS_RIGHT) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt index 05f0935a..b9a31091 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt @@ -1,6 +1,12 @@ package com.depromeet.presentation.seatReview +import android.app.Activity.RESULT_OK +import android.content.Context +import android.content.Intent +import android.graphics.Bitmap +import android.net.Uri import android.os.Bundle +import android.provider.MediaStore import android.view.View import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.PickVisualMediaRequest @@ -10,6 +16,7 @@ import com.depromeet.core.base.BindingBottomSheetDialog import com.depromeet.presentation.R import com.depromeet.presentation.databinding.FragmentUploadBottomSheetBinding import com.depromeet.presentation.extension.setOnSingleClickListener +import java.io.ByteArrayOutputStream class UploadDialogFragment : BindingBottomSheetDialog( R.layout.fragment_upload_bottom_sheet, @@ -22,10 +29,12 @@ class UploadDialogFragment : BindingBottomSheetDialog + private lateinit var takePhotoLauncher: ActivityResultLauncher override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setupPickMultipleMediaLauncher() + setupTakePhotoLauncher() } private fun setupPickMultipleMediaLauncher() { @@ -40,10 +49,40 @@ class UploadDialogFragment : BindingBottomSheetDialog + if (result.resultCode == RESULT_OK) { + val data: Intent? = result.data + val bitmap = data?.extras?.get("data") as Bitmap? + bitmap?.let { + val uri = getImageUri(requireContext(), it) + val bundle = Bundle().apply { + putStringArrayList(SELECTED_IMAGES, arrayListOf(uri.toString())) + } + setFragmentResult(REQUEST_KEY, bundle) + dismiss() + } + } + } + } + + private fun getImageUri(context: Context, bitmap: Bitmap): Uri { + val bytes = ByteArrayOutputStream() + bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bytes) + val path = + MediaStore.Images.Media.insertImage(context.contentResolver, bitmap, "Image", null) + return Uri.parse(path) + } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) binding.btnGallery.setOnSingleClickListener { pickMultipleMediaLauncher.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly)) } + binding.btnTakePhoto.setOnSingleClickListener { + val takePictureIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE) + takePhotoLauncher.launch(takePictureIntent) + } } } From 14365034a0c2021a32f58b943cb4f25efa08e718 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 04:37:25 +0900 Subject: [PATCH 15/25] =?UTF-8?q?[feature/#7]=20=EC=82=AC=EC=A7=84=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=20default=20=EB=B7=B0=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../res/drawable/shape_white_fill_dash.xml | 12 ++++++ .../main/res/layout/activity_review_main.xml | 39 +++++++++++++------ 2 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 presentation/src/main/res/drawable/shape_white_fill_dash.xml diff --git a/presentation/src/main/res/drawable/shape_white_fill_dash.xml b/presentation/src/main/res/drawable/shape_white_fill_dash.xml new file mode 100644 index 00000000..2505c90b --- /dev/null +++ b/presentation/src/main/res/drawable/shape_white_fill_dash.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/layout/activity_review_main.xml b/presentation/src/main/res/layout/activity_review_main.xml index 9d6bc5cd..97b1fd89 100644 --- a/presentation/src/main/res/layout/activity_review_main.xml +++ b/presentation/src/main/res/layout/activity_review_main.xml @@ -93,19 +93,36 @@ + android:layout_height="match_parent" + android:orientation="horizontal"> - + android:background="@drawable/shape_white_fill_dash" + android:orientation="vertical"> + + + + + + Date: Wed, 10 Jul 2024 17:02:51 +0900 Subject: [PATCH 16/25] =?UTF-8?q?[fix/#7]=20=EC=A7=81=EA=B4=80=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EB=A9=94=EC=9D=B8=EB=B7=B0=20UI=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seatReview/ReviewMainActivity.kt | 29 +- .../src/main/res/drawable/ic_delete.xml | 13 + ..._radius16.xml => rect_gray200_fill_16.xml} | 0 ...ll_raduis6.xml => rect_gray200_fill_6.xml} | 2 +- ...l_radius30.xml => rect_gray50_fill_30.xml} | 2 +- ...l => rect_gray50_fill_gray200_line_12.xml} | 2 +- ...ml => rect_white_fill_gray200_dash_12.xml} | 7 +- .../res/layout-v31/activity_main_review.xml | 373 ++++++++++++++++++ ...view_main.xml => activity_main_review.xml} | 112 ++++-- 9 files changed, 484 insertions(+), 56 deletions(-) create mode 100644 presentation/src/main/res/drawable/ic_delete.xml rename presentation/src/main/res/drawable/{shape_gray_fill_radius16.xml => rect_gray200_fill_16.xml} (100%) rename presentation/src/main/res/drawable/{shape_gray_fill_raduis6.xml => rect_gray200_fill_6.xml} (82%) rename presentation/src/main/res/drawable/{shape_gray_fill_radius30.xml => rect_gray50_fill_30.xml} (82%) rename presentation/src/main/res/drawable/{shape_gray_fill_gray_line_raduis12.xml => rect_gray50_fill_gray200_line_12.xml} (87%) rename presentation/src/main/res/drawable/{shape_white_fill_dash.xml => rect_white_fill_gray200_dash_12.xml} (72%) create mode 100644 presentation/src/main/res/layout-v31/activity_main_review.xml rename presentation/src/main/res/layout/{activity_review_main.xml => activity_main_review.xml} (78%) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index 26d33dcc..47719497 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -5,8 +5,10 @@ import android.os.Bundle import android.view.View import android.widget.ImageView import androidx.core.view.isVisible +import coil.load +import coil.transform.RoundedCornersTransformation import com.depromeet.core.base.BaseActivity -import com.depromeet.presentation.databinding.ActivityReviewMainBinding +import com.depromeet.presentation.databinding.ActivityMainReviewBinding import com.depromeet.presentation.extension.setOnSingleClickListener import dagger.hilt.android.AndroidEntryPoint import java.text.SimpleDateFormat @@ -14,12 +16,16 @@ import java.util.Calendar import java.util.Locale @AndroidEntryPoint -class ReviewMainActivity : BaseActivity({ - ActivityReviewMainBinding.inflate(it) +class ReviewMainActivity : BaseActivity({ + ActivityMainReviewBinding.inflate(it) }) { private val imageViews: List by lazy { - listOf(binding.ivFirstImage, binding.ivSecondImage, binding.ivThirdImage) + listOf( + binding.ivFirstImage, + binding.ivSecondImage, + binding.ivThirdImage, + ) } private var selectedImageUris: MutableList = mutableListOf() @@ -37,7 +43,7 @@ class ReviewMainActivity : BaseActivity({ } private fun initUploadDialog() { - binding.btnAddPhoto.setOnClickListener { + binding.btnAddImage.setOnClickListener { val uploadDialogFragment = UploadDialogFragment() uploadDialogFragment.show(supportFragmentManager, uploadDialogFragment.tag) } @@ -48,7 +54,7 @@ class ReviewMainActivity : BaseActivity({ val dateFormat = SimpleDateFormat(DATE_FORMAT, Locale.getDefault()) with(binding) { tvDate.text = dateFormat.format(today.time) - layoutDate.setOnSingleClickListener { + layoutDatePicker.setOnSingleClickListener { val datePickerDialogFragment = DatePickerDialogFragment().apply { onDateSelected = { year, month, day -> val selectedDate = Calendar.getInstance() @@ -79,12 +85,15 @@ class ReviewMainActivity : BaseActivity({ private fun updateImageViews() { with(binding) { - tvAddPhoto.isVisible = selectedImageUris.isEmpty() + layoutAddDefaultImage.isVisible = selectedImageUris.isEmpty() for ((index, uri) in selectedImageUris.withIndex()) { if (index < imageViews.size) { val image = imageViews[index] as ImageView image.isVisible = true image.setImageURI(Uri.parse(uri)) + image.load(Uri.parse(uri)) { + transformations(RoundedCornersTransformation(26f)) + } } } for (index in selectedImageUris.size until imageViews.size) { @@ -92,11 +101,9 @@ class ReviewMainActivity : BaseActivity({ image.isVisible = false } if (selectedImageUris.size == 3) { - svReviewPhoto.post { - svReviewPhoto.fullScroll(View.FOCUS_RIGHT) - } + svAddImage.post { svAddImage.fullScroll(View.FOCUS_RIGHT) } } - btnAddPhoto.isVisible = selectedImageUris.size < imageViews.size + btnAddImage.isVisible = selectedImageUris.size < imageViews.size } } } diff --git a/presentation/src/main/res/drawable/ic_delete.xml b/presentation/src/main/res/drawable/ic_delete.xml new file mode 100644 index 00000000..ececea62 --- /dev/null +++ b/presentation/src/main/res/drawable/ic_delete.xml @@ -0,0 +1,13 @@ + + + + diff --git a/presentation/src/main/res/drawable/shape_gray_fill_radius16.xml b/presentation/src/main/res/drawable/rect_gray200_fill_16.xml similarity index 100% rename from presentation/src/main/res/drawable/shape_gray_fill_radius16.xml rename to presentation/src/main/res/drawable/rect_gray200_fill_16.xml diff --git a/presentation/src/main/res/drawable/shape_gray_fill_raduis6.xml b/presentation/src/main/res/drawable/rect_gray200_fill_6.xml similarity index 82% rename from presentation/src/main/res/drawable/shape_gray_fill_raduis6.xml rename to presentation/src/main/res/drawable/rect_gray200_fill_6.xml index 9c2171f0..ed20478d 100644 --- a/presentation/src/main/res/drawable/shape_gray_fill_raduis6.xml +++ b/presentation/src/main/res/drawable/rect_gray200_fill_6.xml @@ -2,5 +2,5 @@ - + diff --git a/presentation/src/main/res/drawable/shape_gray_fill_radius30.xml b/presentation/src/main/res/drawable/rect_gray50_fill_30.xml similarity index 82% rename from presentation/src/main/res/drawable/shape_gray_fill_radius30.xml rename to presentation/src/main/res/drawable/rect_gray50_fill_30.xml index d655753e..6e1bb096 100644 --- a/presentation/src/main/res/drawable/shape_gray_fill_radius30.xml +++ b/presentation/src/main/res/drawable/rect_gray50_fill_30.xml @@ -2,5 +2,5 @@ - + diff --git a/presentation/src/main/res/drawable/shape_gray_fill_gray_line_raduis12.xml b/presentation/src/main/res/drawable/rect_gray50_fill_gray200_line_12.xml similarity index 87% rename from presentation/src/main/res/drawable/shape_gray_fill_gray_line_raduis12.xml rename to presentation/src/main/res/drawable/rect_gray50_fill_gray200_line_12.xml index 2259816e..276033b8 100644 --- a/presentation/src/main/res/drawable/shape_gray_fill_gray_line_raduis12.xml +++ b/presentation/src/main/res/drawable/rect_gray50_fill_gray200_line_12.xml @@ -2,7 +2,7 @@ - + diff --git a/presentation/src/main/res/drawable/shape_white_fill_dash.xml b/presentation/src/main/res/drawable/rect_white_fill_gray200_dash_12.xml similarity index 72% rename from presentation/src/main/res/drawable/shape_white_fill_dash.xml rename to presentation/src/main/res/drawable/rect_white_fill_gray200_dash_12.xml index 2505c90b..75f14191 100644 --- a/presentation/src/main/res/drawable/shape_white_fill_dash.xml +++ b/presentation/src/main/res/drawable/rect_white_fill_gray200_dash_12.xml @@ -2,11 +2,10 @@ - + - + android:dashGap="3dp" /> \ No newline at end of file diff --git a/presentation/src/main/res/layout-v31/activity_main_review.xml b/presentation/src/main/res/layout-v31/activity_main_review.xml new file mode 100644 index 00000000..8fefad12 --- /dev/null +++ b/presentation/src/main/res/layout-v31/activity_main_review.xml @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/presentation/src/main/res/layout/activity_review_main.xml b/presentation/src/main/res/layout/activity_main_review.xml similarity index 78% rename from presentation/src/main/res/layout/activity_review_main.xml rename to presentation/src/main/res/layout/activity_main_review.xml index 97b1fd89..939a5f66 100644 --- a/presentation/src/main/res/layout/activity_review_main.xml +++ b/presentation/src/main/res/layout/activity_main_review.xml @@ -10,13 +10,12 @@ android:id="@+id/layout_top" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="4dp" android:orientation="horizontal" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> - + android:paddingEnd="16dp"> + android:textStyle="normal" /> - + android:background="#F4F4F4" /> @@ -174,7 +182,11 @@ android:layout_marginVertical="16dp" android:layout_marginStart="16dp" android:text="잠실 야구장" - android:textColor="#333333" + android:lineHeight="145dp" + android:paddingEnd="50dp" + android:textColor="#121212" + android:textFontWeight="700" + android:textStyle="normal" android:textSize="16sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -185,11 +197,11 @@ android:id="@+id/layout_seat_info" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="20dp" + android:layout_marginEnd="2dp" android:orientation="horizontal" android:visibility="invisible" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/tv_stadium_name" + app:layout_constraintEnd_toStartOf="@+id/iv_next_stadium" app:layout_constraintTop_toTopOf="parent"> @@ -214,6 +231,8 @@ android:layout_height="wrap_content" android:layout_marginVertical="16dp" android:text="블럭" + android:textColor="#9F9F9F" + android:textFontWeight="500" android:textSize="13sp" /> @@ -230,6 +251,8 @@ android:layout_height="wrap_content" android:layout_marginVertical="16dp" android:text="열" + android:textColor="#9F9F9F" + android:textFontWeight="500" android:textSize="13sp" /> @@ -271,8 +297,11 @@ android:layout_marginVertical="16dp" android:layout_marginStart="16dp" android:text="내 자리 후기" - android:textColor="#333333" android:textSize="16sp" + android:lineHeight="145dp" + android:textColor="#121212" + android:textFontWeight="700" + android:textStyle="normal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" @@ -281,19 +310,22 @@ + android:textColor="#9F9F9F" + android:textFontWeight="500" + android:textSize="13sp" + android:textStyle="normal" /> Date: Wed, 10 Jul 2024 17:34:33 +0900 Subject: [PATCH 17/25] =?UTF-8?q?[fix/#7]=20bottomSheet=20=EB=B0=B0?= =?UTF-8?q?=EA=B2=BD=20=ED=88=AC=EB=AA=85=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rDialogFragment.kt => DatePickerDialog.kt} | 2 +- ...DialogFragment.kt => ImageUploadDialog.kt} | 32 ++++++++++++------- .../seatReview/ReviewMainActivity.kt | 5 +-- ..._radius12.xml => rect_gray600_fill_12.xml} | 0 ..._fill_top32.xml => rect_white_fill_32.xml} | 0 .../res/layout-v31/activity_main_review.xml | 2 +- .../fragment_date_picker_bottom_sheet.xml | 2 +- .../layout/fragment_upload_bottom_sheet.xml | 12 +++++-- presentation/src/main/res/values/themes.xml | 6 ++++ 9 files changed, 42 insertions(+), 19 deletions(-) rename presentation/src/main/java/com/depromeet/presentation/seatReview/{DatePickerDialogFragment.kt => DatePickerDialog.kt} (92%) rename presentation/src/main/java/com/depromeet/presentation/seatReview/{UploadDialogFragment.kt => ImageUploadDialog.kt} (88%) rename presentation/src/main/res/drawable/{shape_gray600_fill_radius12.xml => rect_gray600_fill_12.xml} (100%) rename presentation/src/main/res/drawable/{shape_white_fill_top32.xml => rect_white_fill_32.xml} (100%) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt similarity index 92% rename from presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt rename to presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt index 03e157ac..8d0145d0 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialogFragment.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt @@ -9,7 +9,7 @@ import dagger.hilt.android.AndroidEntryPoint import java.util.Calendar @AndroidEntryPoint -class DatePickerDialogFragment : BindingBottomSheetDialog( +class DatePickerDialog : BindingBottomSheetDialog( R.layout.fragment_date_picker_bottom_sheet, FragmentDatePickerBottomSheetBinding::inflate, ) { diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt similarity index 88% rename from presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt rename to presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt index b9a31091..bed9e51e 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/UploadDialogFragment.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt @@ -18,7 +18,7 @@ import com.depromeet.presentation.databinding.FragmentUploadBottomSheetBinding import com.depromeet.presentation.extension.setOnSingleClickListener import java.io.ByteArrayOutputStream -class UploadDialogFragment : BindingBottomSheetDialog( +class ImageUploadDialog : BindingBottomSheetDialog( R.layout.fragment_upload_bottom_sheet, FragmentUploadBottomSheetBinding::inflate, ) { @@ -26,6 +26,7 @@ class UploadDialogFragment : BindingBottomSheetDialog @@ -33,10 +34,16 @@ class UploadDialogFragment : BindingBottomSheetDialog @@ -67,16 +74,7 @@ class UploadDialogFragment : BindingBottomSheetDialog({ private fun initUploadDialog() { binding.btnAddImage.setOnClickListener { - val uploadDialogFragment = UploadDialogFragment() + val uploadDialogFragment = ImageUploadDialog() uploadDialogFragment.show(supportFragmentManager, uploadDialogFragment.tag) } } @@ -55,7 +56,7 @@ class ReviewMainActivity : BaseActivity({ with(binding) { tvDate.text = dateFormat.format(today.time) layoutDatePicker.setOnSingleClickListener { - val datePickerDialogFragment = DatePickerDialogFragment().apply { + val datePickerDialogFragment = DatePickerDialog().apply { onDateSelected = { year, month, day -> val selectedDate = Calendar.getInstance() selectedDate.set(year, month, day) diff --git a/presentation/src/main/res/drawable/shape_gray600_fill_radius12.xml b/presentation/src/main/res/drawable/rect_gray600_fill_12.xml similarity index 100% rename from presentation/src/main/res/drawable/shape_gray600_fill_radius12.xml rename to presentation/src/main/res/drawable/rect_gray600_fill_12.xml diff --git a/presentation/src/main/res/drawable/shape_white_fill_top32.xml b/presentation/src/main/res/drawable/rect_white_fill_32.xml similarity index 100% rename from presentation/src/main/res/drawable/shape_white_fill_top32.xml rename to presentation/src/main/res/drawable/rect_white_fill_32.xml diff --git a/presentation/src/main/res/layout-v31/activity_main_review.xml b/presentation/src/main/res/layout-v31/activity_main_review.xml index 8fefad12..5495aadc 100644 --- a/presentation/src/main/res/layout-v31/activity_main_review.xml +++ b/presentation/src/main/res/layout-v31/activity_main_review.xml @@ -143,7 +143,7 @@ android:id="@+id/iv_second_image" android:layout_width="200dp" android:clipToOutline="true" - android:background="@drawable/shape_gray600_fill_radius12" + android:background="@drawable/rect_gray600_fill_12" android:layout_height="match_parent" android:layout_marginStart="8dp" android:scaleType="centerCrop" diff --git a/presentation/src/main/res/layout/fragment_date_picker_bottom_sheet.xml b/presentation/src/main/res/layout/fragment_date_picker_bottom_sheet.xml index 6789bfaa..94b20a5d 100644 --- a/presentation/src/main/res/layout/fragment_date_picker_bottom_sheet.xml +++ b/presentation/src/main/res/layout/fragment_date_picker_bottom_sheet.xml @@ -3,7 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/shape_white_fill_top32"> + android:background="@drawable/rect_white_fill_32"> + android:background="@drawable/rect_white_fill_32"> @@ -23,7 +23,9 @@ android:layout_marginTop="24dp" android:gravity="center" android:text="업로드" - android:textColor="#333333" + android:textColor="#121212" + android:textFontWeight="700" + android:textStyle="normal" android:textSize="16sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -57,6 +59,8 @@ android:layout_height="wrap_content" android:layout_marginStart="12dp" android:text="사진 촬영" + android:textFontWeight="500" + android:textStyle="normal" android:gravity="center" android:textColor="#4A4A4A" android:textSize="16sp" /> @@ -84,6 +88,8 @@ android:layout_height="wrap_content" android:layout_marginStart="12dp" android:text="갤러리에서 선택" + android:textFontWeight="500" + android:textStyle="normal" android:gravity="center" android:textColor="#4A4A4A" android:textSize="16sp" /> diff --git a/presentation/src/main/res/values/themes.xml b/presentation/src/main/res/values/themes.xml index 7e7a2fbd..d561782c 100644 --- a/presentation/src/main/res/values/themes.xml +++ b/presentation/src/main/res/values/themes.xml @@ -18,4 +18,10 @@ false spinner + + \ No newline at end of file From 6ebc92369acd31f88a3462ce04b04d3e8811591d Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 17:47:16 +0900 Subject: [PATCH 18/25] [fix/#7] manifest true -> false --- app/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8b1ac4e8..bff743e5 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -31,7 +31,7 @@ + android:exported="false"/> \ No newline at end of file From 76155b69b52cff2222f597363cd568ae896cccd8 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 17:47:59 +0900 Subject: [PATCH 19/25] =?UTF-8?q?[fix/#7]=20manifest=20ReviewMainActivity?= =?UTF-8?q?=20screenOrientatioin=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bff743e5..a8e07e86 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -31,6 +31,7 @@ From 6208360735f5f7826c4d0a83764679cc8b3e096a Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:09:07 +0900 Subject: [PATCH 20/25] =?UTF-8?q?[fix/#7]=20xml=20convention=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 2 +- .../compileKotlin/cacheable/last-build.bin | Bin 18 -> 18 bytes .../local-state/build-history.bin | Bin 31 -> 31 bytes .../seatReview/DatePickerDialog.kt | 2 +- .../seatReview/ImageUploadDialog.kt | 4 +- .../res/layout-v31/activity_main_review.xml | 373 ------------------ .../main/res/layout/activity_main_review.xml | 9 +- .../fragment_date_picker_bottom_sheet.xml | 2 +- .../layout/fragment_upload_bottom_sheet.xml | 13 +- "\353\254\264\354\240\234" | 2 +- 10 files changed, 20 insertions(+), 387 deletions(-) delete mode 100644 presentation/src/main/res/layout-v31/activity_main_review.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a8e07e86..343762ff 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -32,7 +32,7 @@ + android:exported="true"/> \ No newline at end of file diff --git a/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin b/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin index 8648f0d2e7a5e8a103db94eda7612b69e16da0f2..430c288eae57472ee73fdd055939b344293dc238 100644 GIT binary patch literal 18 YcmZ4UmVvdLhk=1{!W@~Dcm^N<05U-YE&u=k literal 18 YcmZ4UmVvdLhk=1{!t};7HVi-j05+Wj(*OVf diff --git a/buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin b/buildSrc/build/kotlin/compileKotlin/local-state/build-history.bin index daf1514ee82f90e658749d6da62a4d0da5e7e184..218284506d05b034c18db90d319baf9b866ef9e4 100644 GIT binary patch literal 31 ccmZ4UmVvcgk^ur385kHR%#lfnhw>R109l&^JOBUy literal 31 dcmZ4UmVvcgk^ur385kHROm9461LZR?003by1mOSx diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt index 8d0145d0..635886b0 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt @@ -21,7 +21,7 @@ class DatePickerDialog : BindingBottomSheetDialog + binding.dpDatePicker.init(selectedYear, selectedMonth, selectedDay,) { _, year, month, day -> selectedYear = year selectedMonth = month selectedDay = day diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt index bed9e51e..7913bfbc 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt @@ -75,10 +75,10 @@ class ImageUploadDialog : BindingBottomSheetDialog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/presentation/src/main/res/layout/activity_main_review.xml b/presentation/src/main/res/layout/activity_main_review.xml index 939a5f66..d60fc30a 100644 --- a/presentation/src/main/res/layout/activity_main_review.xml +++ b/presentation/src/main/res/layout/activity_main_review.xml @@ -121,6 +121,7 @@ android:textStyle="normal" /> + app:layout_constraintTop_toTopOf="@+id/v_handler" /> Date: Wed, 10 Jul 2024 19:13:28 +0900 Subject: [PATCH 21/25] =?UTF-8?q?[fix/#7]=20=EC=BD=94=EB=93=9C=20=EA=B0=80?= =?UTF-8?q?=EB=8F=85=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/seatReview/ReviewMainActivity.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt index 8ba3917f..e82d4016 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ReviewMainActivity.kt @@ -76,18 +76,14 @@ class ReviewMainActivity : BaseActivity({ } private fun addSelectedImages(newImageUris: List) { - for (uri in newImageUris) { - if (!selectedImageUris.contains(uri)) { - selectedImageUris.add(uri) - } - } + selectedImageUris.addAll(newImageUris.filterNot { selectedImageUris.contains(it) }) updateImageViews() } private fun updateImageViews() { with(binding) { layoutAddDefaultImage.isVisible = selectedImageUris.isEmpty() - for ((index, uri) in selectedImageUris.withIndex()) { + selectedImageUris.forEachIndexed { index, uri -> if (index < imageViews.size) { val image = imageViews[index] as ImageView image.isVisible = true From d5cc58d1de6e7a727bef5407f402e5ebad2d5ca1 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:20:07 +0900 Subject: [PATCH 22/25] =?UTF-8?q?[fix/#7]=20calendarInstance=20=EC=A4=91?= =?UTF-8?q?=EB=B3=B5=20=EC=B0=B8=EC=A1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/seatReview/DatePickerDialog.kt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt index 635886b0..3490a573 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt @@ -5,23 +5,28 @@ import android.view.View import com.depromeet.core.base.BindingBottomSheetDialog import com.depromeet.presentation.R import com.depromeet.presentation.databinding.FragmentDatePickerBottomSheetBinding -import dagger.hilt.android.AndroidEntryPoint import java.util.Calendar -@AndroidEntryPoint class DatePickerDialog : BindingBottomSheetDialog( R.layout.fragment_date_picker_bottom_sheet, FragmentDatePickerBottomSheetBinding::inflate, ) { var onDateSelected: ((year: Int, month: Int, day: Int) -> Unit)? = null - private var selectedYear: Int = Calendar.getInstance().get(Calendar.YEAR) - private var selectedMonth: Int = Calendar.getInstance().get(Calendar.MONTH) - private var selectedDay: Int = Calendar.getInstance().get(Calendar.DAY_OF_MONTH) + + companion object { + private val calendarInstance: Calendar by lazy { + Calendar.getInstance() + } + } + + private var selectedYear: Int = calendarInstance.get(Calendar.YEAR) + private var selectedMonth: Int = calendarInstance.get(Calendar.MONTH) + private var selectedDay: Int = calendarInstance.get(Calendar.DAY_OF_MONTH) override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - binding.dpDatePicker.init(selectedYear, selectedMonth, selectedDay,) { _, year, month, day -> + binding.dpDatePicker.init(selectedYear, selectedMonth, selectedDay) { _, year, month, day -> selectedYear = year selectedMonth = month selectedDay = day From bc24c87f5a2319ebb20a83d3c799aff050e318fc Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:20:35 +0900 Subject: [PATCH 23/25] =?UTF-8?q?[fix/#7]=20bundle=20pair=20=ED=98=95?= =?UTF-8?q?=ED=83=9C=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../depromeet/presentation/seatReview/ImageUploadDialog.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt index 7913bfbc..c4fa44a5 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt @@ -11,6 +11,7 @@ import android.view.View import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.PickVisualMediaRequest import androidx.activity.result.contract.ActivityResultContracts +import androidx.core.os.bundleOf import androidx.fragment.app.setFragmentResult import com.depromeet.core.base.BindingBottomSheetDialog import com.depromeet.presentation.R @@ -48,9 +49,7 @@ class ImageUploadDialog : BindingBottomSheetDialog val uriList = uris.map { it.toString() } - val bundle = Bundle().apply { - putStringArrayList(SELECTED_IMAGES, ArrayList(uriList)) - } + val bundle = bundleOf(SELECTED_IMAGES to uriList) setFragmentResult(REQUEST_KEY, bundle) dismiss() } From 11ec6e41293fba10aead764ead8c553213f0c955 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:21:41 +0900 Subject: [PATCH 24/25] =?UTF-8?q?[fix/#7]=20manifest=20MainActivity?= =?UTF-8?q?=EB=A7=8C=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 343762ff..cbd58854 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -28,11 +28,6 @@ - - \ No newline at end of file From 5641869cb3174759a404361bba08e27eb237e7a4 Mon Sep 17 00:00:00 2001 From: pmj1459 <76741702+minju1459@users.noreply.github.com> Date: Wed, 10 Jul 2024 19:33:11 +0900 Subject: [PATCH 25/25] =?UTF-8?q?[fix/#7]=20dialog=20AndroidEntryPoint=20a?= =?UTF-8?q?nnotaion=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/depromeet/presentation/seatReview/DatePickerDialog.kt | 2 ++ .../com/depromeet/presentation/seatReview/ImageUploadDialog.kt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt index 3490a573..cef1d2a7 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/DatePickerDialog.kt @@ -5,8 +5,10 @@ import android.view.View import com.depromeet.core.base.BindingBottomSheetDialog import com.depromeet.presentation.R import com.depromeet.presentation.databinding.FragmentDatePickerBottomSheetBinding +import dagger.hilt.android.AndroidEntryPoint import java.util.Calendar +@AndroidEntryPoint class DatePickerDialog : BindingBottomSheetDialog( R.layout.fragment_date_picker_bottom_sheet, FragmentDatePickerBottomSheetBinding::inflate, diff --git a/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt b/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt index c4fa44a5..be897456 100644 --- a/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt +++ b/presentation/src/main/java/com/depromeet/presentation/seatReview/ImageUploadDialog.kt @@ -17,8 +17,10 @@ import com.depromeet.core.base.BindingBottomSheetDialog import com.depromeet.presentation.R import com.depromeet.presentation.databinding.FragmentUploadBottomSheetBinding import com.depromeet.presentation.extension.setOnSingleClickListener +import dagger.hilt.android.AndroidEntryPoint import java.io.ByteArrayOutputStream +@AndroidEntryPoint class ImageUploadDialog : BindingBottomSheetDialog( R.layout.fragment_upload_bottom_sheet, FragmentUploadBottomSheetBinding::inflate,