From a5fe4ba825d4c6ca25c99422fd3381768ff89a7c Mon Sep 17 00:00:00 2001 From: beom84 Date: Thu, 23 Jan 2025 15:44:46 +0900 Subject: [PATCH 01/13] [feat] #63 OnboardingStartScreen Graphic --- .../onboardingstart/OnboardingStartScreen.kt | 23 +- .../res/drawable/img_onboarding_start.xml | 382 ++++++++++++++++++ 2 files changed, 396 insertions(+), 9 deletions(-) create mode 100644 app/src/main/res/drawable/img_onboarding_start.xml diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt index ba699e35..28bc1c79 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt @@ -3,10 +3,12 @@ package org.android.bbangzip.presentation.ui.onboarding.onboardingstart import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -28,29 +30,31 @@ fun OnboardingStartScreen( ) { Column( modifier = - Modifier - .fillMaxSize() - .padding(start = 16.dp, end = 16.dp, bottom = 16.dp), + Modifier + .fillMaxSize() + .padding(start = 16.dp, end = 16.dp, bottom = 16.dp), ) { Text( text = stringResource(id = R.string.onboarding_start_title), modifier = - Modifier - .fillMaxWidth() - .padding(top = (LocalConfiguration.current.screenHeightDp * 0.184).dp), + Modifier + .fillMaxWidth() + .padding(top = (LocalConfiguration.current.screenHeightDp * 0.184).dp), style = BbangZipTheme.typography.title2Bold, color = BbangZipTheme.colors.labelNormal_282119, ) - Spacer(modifier = Modifier.weight(1f)) + Spacer(modifier = Modifier.height(32.dp)) Image( painter = painterResource(id = R.drawable.img_onboarding_start), - modifier = Modifier.fillMaxWidth(), contentDescription = null, + modifier = Modifier + .fillMaxWidth() + .aspectRatio(8f / 9f) ) - Spacer(modifier = Modifier.height(16.dp)) + Spacer(modifier = Modifier.weight(1f)) BbangZipButton( modifier = Modifier.fillMaxWidth(), @@ -67,5 +71,6 @@ fun OnboardingStartScreen( @Composable private fun OnboardingStartScreenPreview() { BBANGZIPTheme { + OnboardingStartScreen() } } diff --git a/app/src/main/res/drawable/img_onboarding_start.xml b/app/src/main/res/drawable/img_onboarding_start.xml new file mode 100644 index 00000000..192ee020 --- /dev/null +++ b/app/src/main/res/drawable/img_onboarding_start.xml @@ -0,0 +1,382 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From f3d77e1697e56682bfefbf079c37628523e2c8b8 Mon Sep 17 00:00:00 2001 From: beom84 Date: Thu, 23 Jan 2025 16:07:25 +0900 Subject: [PATCH 02/13] =?UTF-8?q?[feat]=20#63=20OnboardingEndScreen=20Grap?= =?UTF-8?q?hic=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onboardingend/OnboardingEndScreen.kt | 36 +- .../onboardingstart/OnboardingStartScreen.kt | 2 +- .../main/res/drawable/img_onboarding_end.xml | 400 ++++++++++++++++++ .../res/drawable/img_onboarding_start.png | Bin 11989 -> 0 bytes 4 files changed, 425 insertions(+), 13 deletions(-) create mode 100644 app/src/main/res/drawable/img_onboarding_end.xml delete mode 100644 app/src/main/res/drawable/img_onboarding_start.png diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingend/OnboardingEndScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingend/OnboardingEndScreen.kt index e26c00e9..c2136e7c 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingend/OnboardingEndScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingend/OnboardingEndScreen.kt @@ -4,6 +4,7 @@ import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -14,6 +15,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import org.android.bbangzip.R import org.android.bbangzip.presentation.component.button.BbangZipButton @@ -29,9 +31,9 @@ fun OnboardingEndScreen( ) { Column( modifier = - Modifier - .fillMaxSize() - .background(color = BbangZipTheme.colors.backgroundNormal_FFFFFF), + Modifier + .fillMaxWidth() + .background(color = BbangZipTheme.colors.backgroundNormal_FFFFFF), ) { BbangZipBaseTopBar( leadingIcon = R.drawable.ic_chevronleft_thick_small_24, @@ -41,26 +43,30 @@ fun OnboardingEndScreen( Text( text = stringResource(id = R.string.onboarding_final_title), modifier = - Modifier - .fillMaxWidth() - .padding(start = 16.dp, end = 16.dp) - .padding(top = (LocalConfiguration.current.screenHeightDp * 0.184).dp), + Modifier + .fillMaxWidth() + .padding(start = 16.dp, end = 16.dp) + .padding(top = (LocalConfiguration.current.screenHeightDp * 0.081).dp), style = BbangZipTheme.typography.title2Bold, color = BbangZipTheme.colors.labelNormal_282119, ) + Spacer(modifier = Modifier.height(32.dp)) - Spacer(modifier = Modifier.weight(1f)) Image( - painter = painterResource(id = R.drawable.img_login2), - modifier = Modifier.fillMaxWidth(), + painter = painterResource(id = R.drawable.img_onboarding_end), + modifier = Modifier + .fillMaxWidth() + .aspectRatio(8f / 9f), contentDescription = null, ) + Spacer(modifier = Modifier.weight(1f)) - Spacer(modifier = Modifier.height(16.dp)) BbangZipButton( - modifier = Modifier.fillMaxWidth().padding(start = 16.dp, end = 16.dp, bottom = 16.dp), + modifier = Modifier + .fillMaxWidth() + .padding(start = 16.dp, end = 16.dp, bottom = 16.dp), bbangZipButtonType = BbangZipButtonType.Solid, bbangZipButtonSize = BbangZipButtonSize.Large, onClick = { onClickNextBtn() }, @@ -69,3 +75,9 @@ fun OnboardingEndScreen( ) } } + +@Preview +@Composable +private fun OnboardingEndScreenPreview() { + OnboardingEndScreen() +} \ No newline at end of file diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt index 28bc1c79..bb62b038 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt @@ -39,7 +39,7 @@ fun OnboardingStartScreen( modifier = Modifier .fillMaxWidth() - .padding(top = (LocalConfiguration.current.screenHeightDp * 0.184).dp), + .padding(top = (LocalConfiguration.current.screenHeightDp * 0.15).dp), style = BbangZipTheme.typography.title2Bold, color = BbangZipTheme.colors.labelNormal_282119, ) diff --git a/app/src/main/res/drawable/img_onboarding_end.xml b/app/src/main/res/drawable/img_onboarding_end.xml new file mode 100644 index 00000000..0e42a9ae --- /dev/null +++ b/app/src/main/res/drawable/img_onboarding_end.xml @@ -0,0 +1,400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/img_onboarding_start.png b/app/src/main/res/drawable/img_onboarding_start.png deleted file mode 100644 index 3084cfbd93a89a68dbbdb48607503941d65f4bed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11989 zcmdsdcT`hNyYCK25dXz-bM7DCTKBHI7a==)W}fnUe)G)inR%zBp~%DlWdHzx zNm=QEHULn8w^RT$LGfV`(PI%l?)};rp0Q#qI!QUs{l#Dz8fce|;2a+Jfd=Y%e z;rY=TZ~4IeDhV7R{ReczW?44Pot zI6wTPM{fdX=D*^yH|>Q1!Ce8A`95zO#yMZ3bvC~;U-O_y)k$4nb-1}s(~z$8u1}f1 z0P4t|p>iu4aZ~nUi=AyO@Cz3NXEe9W1v-~_Z=|i{VC{vrbmj7A zC%NV!7;7-@5d?s?bfHOKtDY6^Zw)svrcM^~ra7k-7NuhR5B$&a5yE{C>&2zSSvkCt z!pc=37_#2vztMZKPb7b>r?+lY6=tUWB&}FO+xO@zU%g2oY444J8O6he1K3rB0L!zb z4QpLHOl1vfSoD}olk%V`UXAHVSPmkdfWwY?9kP_wPQU*Q=i#Ac1v1;YYFD=f63q@) zHP#%J8B4Y$YB{k>7diNFwHsY{?s8^o3D89?>SBu5*sy!)oZ}5Mz9k8~>a#a{^XQI6jOEeVT=dSS~(Eo`&Z2`WkihNEG79bK;`hkHDHI4VWQ%C9eY)ZB*wY8Nk42%%&oBncj9k5gV_Mn(bpY>nV-q+FX z-A7W&O&DJ-rl7La(uVym&0n@@C+vAyfhh-;pd$~)uH0ERWwdn~jpSz2H@^j3v$Jv@ze8f=y}Li;VypmFR^Y)ZS;lomXL&7p z=NkTcK`}x&f2>%fVSYvi`3lg#3cSUztT%3sbjGkyj4(!)Pof&p^V7xhyEia*0Y&b=r={%e?nU&oyY47*}R^%aN0|KtLquZP)UIyp)|W(a7#D z^(N6bmevGx zKViC+TT$wl0NI~_tC*%fF1Dlv)O-Bb^?z+1r0^or;B2p3WdfI`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M=V`)>MCm$i8( z?k$7(yhCS0=_t7)C})*`%^mE&j8_8E-+*GHOLOfU*YKr}tNY2*=-VfHIgQGFCLP8D z2uN7%-UZA%KsF){c=2dTY`I|vX}te|iA7M!5jMd1zSn_tVx9F|~ zO|Nv1|7t?4wE>{z44T}Pmmc&2q=`|7J@jD7W5j>C8)*%wgWW+FTo>-Sy^g|&CijMK z<65o*S~g&V_w||qg~tB2#vS%B;a}pz9$%#~qQQChAV5)@bdS#g9;qXNXBm!JVVC)@qGCv z9rk`{s(rfrI9pC?dxm)ye#8+8=gJ9zG>|@+lw47Yt=IG`jC~dc56??{>alF>S54$L zvf+GqcJzks;s@@J&3D8Bh4Y>nJ7ReHfko*z;*em+OaM6FRmC<80t64Y_xxeq9t7QcXr3{+{waa24zC42xiDZa$?SWN|@*H&pZplOU2j0o175aZKMdi1P>2hyQzK6 zNbxO3Ng5RioQMEbT2|>+N1hgL=PCe?ycH-&?;f`nqXu+eAKN3mEj+9uZL{)1MGKT2 zuhaa-SWx`m3S0bLAcj^eFS@k;&xVvJG3sj@?-|X(^<`6n-2TjaGU*ZJ=uYD@;@CKF zL;ZjI^7o&=68^VOyNv1fmopFpFe<8B#l@DKkTWyHH_>2z`B(2Ne8xbq9={YzuJBlT z!z(dFX7v~V*6k#&3TNrZ& zu+**%y8QHC5A%Pu9PuAR^8ayNkX8SZ3))4YWBnQJ;o~>^*Req5hZ+w`?^(Y5AHihp AkN^Mx From 0f85c3c6ee0b5c68032a04c7a3d997d6cd1a647e Mon Sep 17 00:00:00 2001 From: beom84 Date: Thu, 23 Jan 2025 17:41:06 +0900 Subject: [PATCH 03/13] =?UTF-8?q?[feat]=20#63=20friend=20dummy=20profile?= =?UTF-8?q?=20graphic=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/component/card/FriendCard.kt | 11 +++- .../model/card/FriendCardModel.kt | 4 +- .../presentation/ui/friend/FriendContract.kt | 8 +++ .../presentation/ui/friend/FriendScreen.kt | 2 +- .../res/drawable/img_friend_profile_1.xml | 52 +++++++++++++++++++ .../res/drawable/img_friend_profile_2.xml | 52 +++++++++++++++++++ .../res/drawable/img_friend_profile_3.xml | 52 +++++++++++++++++++ .../res/drawable/img_friend_profile_4.xml | 52 +++++++++++++++++++ 8 files changed, 229 insertions(+), 4 deletions(-) create mode 100644 app/src/main/res/drawable/img_friend_profile_1.xml create mode 100644 app/src/main/res/drawable/img_friend_profile_2.xml create mode 100644 app/src/main/res/drawable/img_friend_profile_3.xml create mode 100644 app/src/main/res/drawable/img_friend_profile_4.xml diff --git a/app/src/main/java/org/android/bbangzip/presentation/component/card/FriendCard.kt b/app/src/main/java/org/android/bbangzip/presentation/component/card/FriendCard.kt index ffe1fd77..d09f3c82 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/component/card/FriendCard.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/component/card/FriendCard.kt @@ -12,14 +12,17 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Icon import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.layout.ContentScale +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.unit.dp @@ -67,10 +70,14 @@ fun FriendCard( verticalAlignment = Alignment.CenterVertically, ) { Image( - imageVector = ImageVector.vectorResource(id = R.drawable.ic_user_one_default_24), + painter = painterResource(id = data.imgSrc), contentDescription = null, contentScale = ContentScale.FillBounds, - modifier = Modifier.size(48.dp), + modifier = Modifier.size(48.dp).clip(CircleShape).border( + width = 1.dp, + color = BbangZipTheme.colors.lineNormal_68645E_22, + shape = CircleShape, + ), ) Spacer(modifier = Modifier.width(16.dp)) diff --git a/app/src/main/java/org/android/bbangzip/presentation/model/card/FriendCardModel.kt b/app/src/main/java/org/android/bbangzip/presentation/model/card/FriendCardModel.kt index 3f7d0b47..fb50c24e 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/model/card/FriendCardModel.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/model/card/FriendCardModel.kt @@ -1,6 +1,7 @@ package org.android.bbangzip.presentation.model.card import android.os.Parcelable +import androidx.annotation.DrawableRes import kotlinx.parcelize.Parcelize import org.android.bbangzip.presentation.component.card.BbangZipCardState @@ -10,4 +11,5 @@ data class FriendCardModel( val friendName: String, val imageUrl: String, val state: BbangZipCardState, -) : Parcelable + @DrawableRes val imgSrc : Int = 0, + ) : Parcelable diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendContract.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendContract.kt index e8e8432d..26b5c8d0 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendContract.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendContract.kt @@ -2,6 +2,7 @@ package org.android.bbangzip.presentation.ui.friend import android.os.Parcelable import kotlinx.parcelize.Parcelize +import org.android.bbangzip.R import org.android.bbangzip.presentation.component.card.BbangZipCardState import org.android.bbangzip.presentation.model.card.FriendCardModel import org.android.bbangzip.presentation.type.FriendMenuType @@ -17,42 +18,49 @@ class FriendContract { friendName = "이승범", imageUrl = "https://example.com/alice.jpg", state = BbangZipCardState.DEFAULT, + imgSrc = R.drawable.img_friend_profile_1 ), FriendCardModel( friendId = 2, friendName = "김재민", imageUrl = "https://example.com/bob.jpg", state = BbangZipCardState.DEFAULT, + imgSrc = R.drawable.img_friend_profile_2 ), FriendCardModel( friendId = 3, friendName = "하지은", imageUrl = "https://example.com/charlie.jpg", state = BbangZipCardState.DEFAULT, + imgSrc = R.drawable.img_friend_profile_3 ), FriendCardModel( friendId = 4, friendName = "신우연", imageUrl = "https://example.com/alice.jpg", state = BbangZipCardState.DEFAULT, + imgSrc = R.drawable.img_friend_profile_4 ), FriendCardModel( friendId = 5, friendName = "김재민", imageUrl = "https://example.com/bob.jpg", state = BbangZipCardState.DEFAULT, + imgSrc = R.drawable.img_friend_profile_1 ), FriendCardModel( friendId = 6, friendName = "하지은", imageUrl = "https://example.com/charlie.jpg", state = BbangZipCardState.DEFAULT, + imgSrc = R.drawable.img_friend_profile_2 ), FriendCardModel( friendId = 7, friendName = "이승범", imageUrl = "https://example.com/alice.jpg", state = BbangZipCardState.DEFAULT, + imgSrc = R.drawable.img_friend_profile_3 ), ), val menuFilterType: FriendMenuType = FriendMenuType.ALL, diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendScreen.kt index ebeee21a..8a1650e8 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendScreen.kt @@ -124,7 +124,7 @@ fun FriendScreen( modifier = Modifier .fillMaxWidth() - .padding(24.dp), + .padding(bottom=24.dp, start = 24.dp, end = 24.dp), ) { Text( text = stringResource(R.string.friend_boss_count, friendState.friendList.size), diff --git a/app/src/main/res/drawable/img_friend_profile_1.xml b/app/src/main/res/drawable/img_friend_profile_1.xml new file mode 100644 index 00000000..e89065df --- /dev/null +++ b/app/src/main/res/drawable/img_friend_profile_1.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/img_friend_profile_2.xml b/app/src/main/res/drawable/img_friend_profile_2.xml new file mode 100644 index 00000000..531cc308 --- /dev/null +++ b/app/src/main/res/drawable/img_friend_profile_2.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/img_friend_profile_3.xml b/app/src/main/res/drawable/img_friend_profile_3.xml new file mode 100644 index 00000000..22051688 --- /dev/null +++ b/app/src/main/res/drawable/img_friend_profile_3.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/img_friend_profile_4.xml b/app/src/main/res/drawable/img_friend_profile_4.xml new file mode 100644 index 00000000..ad76930b --- /dev/null +++ b/app/src/main/res/drawable/img_friend_profile_4.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + From f779aa34d4a02c9bd782fba630f573e3005dee3f Mon Sep 17 00:00:00 2001 From: beom84 Date: Thu, 23 Jan 2025 18:05:02 +0900 Subject: [PATCH 04/13] =?UTF-8?q?[feat]=20#63=20todo=20Empty=20view=20grap?= =?UTF-8?q?hic=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ui/todo/TodoScreen.kt | 135 ++++++++------- app/src/main/res/drawable/img_empty_view.xml | 161 ++++++++++++++++++ 2 files changed, 233 insertions(+), 63 deletions(-) create mode 100644 app/src/main/res/drawable/img_empty_view.xml diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt index 68cac5b7..8280b5de 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt @@ -1,5 +1,6 @@ package org.android.bbangzip.presentation.ui.todo +import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement @@ -9,6 +10,7 @@ import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -29,6 +31,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.style.TextAlign @@ -70,10 +73,10 @@ fun TodoScreen( ) { Box( modifier = - modifier - .fillMaxSize() - .padding(bottom = bottomPadding.calculateBottomPadding()) - .background(color = BbangZipTheme.colors.staticWhite_FFFFFF), + modifier + .fillMaxSize() + .padding(bottom = bottomPadding.calculateBottomPadding()) + .background(color = BbangZipTheme.colors.staticWhite_FFFFFF), ) { LazyColumn { item { @@ -89,7 +92,13 @@ fun TodoScreen( if (todoState.screenType == ToDoScreenType.EMPTY) { item { Column(modifier = modifier.padding(horizontal = 16.dp)) { - EmptyView() + Image( + painter = painterResource (id = R.drawable.img_empty_view), + contentDescription = null, + modifier = Modifier + .fillMaxWidth() + .aspectRatio(16f / 15f) + ) Spacer(modifier = Modifier.height(16.dp)) @@ -127,10 +136,10 @@ fun TodoScreen( item { Box( modifier = - Modifier - .padding(start = 24.dp) - .fillMaxWidth() - .height(58.dp), + Modifier + .padding(start = 24.dp) + .fillMaxWidth() + .height(58.dp), contentAlignment = Alignment.CenterStart, ) { Text( @@ -144,18 +153,18 @@ fun TodoScreen( Row( modifier = - Modifier - .padding(horizontal = 16.dp) - .fillMaxWidth(), + Modifier + .padding(horizontal = 16.dp) + .fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, ) { Spacer(modifier = Modifier.weight(1f)) Box( modifier = - Modifier - .clip(CircleShape) - .clickable { onCloseIconClicked() }, + Modifier + .clip(CircleShape) + .clickable { onCloseIconClicked() }, contentAlignment = Alignment.Center, ) { Icon( @@ -234,11 +243,11 @@ fun TodoScreen( onClick = { onItemDeleteButtonClicked() }, label = stringResource(R.string.todo_delete_screen_delete_button_text, todoState.selectedItemList.size), modifier = - Modifier - .padding(horizontal = 16.dp) - .fillMaxWidth() - .align(Alignment.BottomCenter) - .padding(bottom = 16.dp), + Modifier + .padding(horizontal = 16.dp) + .fillMaxWidth() + .align(Alignment.BottomCenter) + .padding(bottom = 16.dp), isEnable = todoState.selectedItemList.isNotEmpty(), trailingIcon = R.drawable.ic_trash_default_24, ) @@ -271,8 +280,8 @@ fun DateMessageCard( ) { Box( modifier = - modifier - .fillMaxWidth(), + modifier + .fillMaxWidth(), ) { Column(modifier = Modifier.fillMaxWidth()) { Column( @@ -376,35 +385,35 @@ fun StudyCountText( ) { Box( modifier = - modifier - .padding(horizontal = 16.dp) - .fillMaxWidth() - .height(58.dp), + modifier + .padding(horizontal = 16.dp) + .fillMaxWidth() + .height(58.dp), contentAlignment = Alignment.CenterStart, ) { Column( modifier = - Modifier - .padding(start = 8.dp), + Modifier + .padding(start = 8.dp), ) { Text( text = - when { - completeCount > 0 && remainingCount != 0 -> stringResource(R.string.todo_complete_count_text, completeCount) - remainingCount == 0 -> stringResource(R.string.todo_complete_remaining_nothing_text) - else -> stringResource(R.string.todo_complete_nothing_text) - }, + when { + completeCount > 0 && remainingCount != 0 -> stringResource(R.string.todo_complete_count_text, completeCount) + remainingCount == 0 -> stringResource(R.string.todo_complete_remaining_nothing_text) + else -> stringResource(R.string.todo_complete_nothing_text) + }, style = BbangZipTheme.typography.label1Bold, color = BbangZipTheme.colors.labelAlternative_282119_61, ) Text( text = - if (remainingCount != 0) { - stringResource(R.string.todo_remaing_count_text, remainingCount) - } else { - stringResource(R.string.todo_remaining_nothing_text) - }, + if (remainingCount != 0) { + stringResource(R.string.todo_remaing_count_text, remainingCount) + } else { + stringResource(R.string.todo_remaining_nothing_text) + }, style = BbangZipTheme.typography.title3Bold, color = BbangZipTheme.colors.labelNormal_282119, ) @@ -420,18 +429,18 @@ fun DeleteAndFilterIcons( ) { Row( modifier = - modifier - .padding(horizontal = 16.dp) - .fillMaxWidth(), + modifier + .padding(horizontal = 16.dp) + .fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, ) { Spacer(modifier = Modifier.weight(1f)) Box( modifier = - Modifier - .clip(CircleShape) - .clickable { onDeleteIconClicked() }, + Modifier + .clip(CircleShape) + .clickable { onDeleteIconClicked() }, contentAlignment = Alignment.Center, ) { Icon( @@ -444,9 +453,9 @@ fun DeleteAndFilterIcons( Box( modifier = - Modifier - .clip(CircleShape) - .clickable { onFilterIconClicked() }, + Modifier + .clip(CircleShape) + .clickable { onFilterIconClicked() }, contentAlignment = Alignment.Center, ) { Icon( @@ -465,10 +474,10 @@ fun EmptyView( ) { Box( modifier = - modifier - .fillMaxWidth() - .height(328.dp) - .background(color = BbangZipTheme.colors.backgroundAlternative_F5F5F5, shape = RoundedCornerShape(size = 32.dp)), + modifier + .fillMaxWidth() + .height(328.dp) + .background(color = BbangZipTheme.colors.backgroundAlternative_F5F5F5, shape = RoundedCornerShape(size = 32.dp)), contentAlignment = Alignment.Center, ) { Text(text = "Empty View") @@ -503,14 +512,14 @@ fun BbangZipToDoFilterPickerBottomSheet( Text( text = item.filter, modifier = - Modifier - .fillMaxWidth() - .applyFilterOnClick { onSelectedItemChanged(item) } - .background( - color = if (item != selectedItem) BbangZipTheme.colors.staticWhite_FFFFFF else BbangZipTheme.colors.fillStrong_68645E_16, - shape = RoundedCornerShape(16.dp), - ) - .padding(vertical = 8.dp), + Modifier + .fillMaxWidth() + .applyFilterOnClick { onSelectedItemChanged(item) } + .background( + color = if (item != selectedItem) BbangZipTheme.colors.staticWhite_FFFFFF else BbangZipTheme.colors.fillStrong_68645E_16, + shape = RoundedCornerShape(16.dp), + ) + .padding(vertical = 8.dp), textAlign = TextAlign.Center, style = BbangZipTheme.typography.body1Bold, color = BbangZipTheme.colors.labelNormal_282119, @@ -540,9 +549,9 @@ fun RevertCompleteBottomSheet( Text( text = bottomSheetTitle, modifier = - Modifier - .align(Alignment.CenterHorizontally) - .padding(vertical = 15.dp), + Modifier + .align(Alignment.CenterHorizontally) + .padding(vertical = 15.dp), style = BbangZipTheme.typography.headline1Bold, color = BbangZipTheme.colors.labelNeutral_282119_88, ) @@ -748,7 +757,7 @@ fun TodoScreenMockPreview() { ) TodoScreen( - todoState = mockTodoStates[0], + todoState = mockTodoStates[2], todayDate = listOf("2025", "01", "18"), bottomPadding = PaddingValues(), ) diff --git a/app/src/main/res/drawable/img_empty_view.xml b/app/src/main/res/drawable/img_empty_view.xml new file mode 100644 index 00000000..f71b1bed --- /dev/null +++ b/app/src/main/res/drawable/img_empty_view.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 0786c7622dc3549dfd80f439d70089fc7e6852a9 Mon Sep 17 00:00:00 2001 From: beom84 Date: Thu, 23 Jan 2025 19:14:31 +0900 Subject: [PATCH 05/13] =?UTF-8?q?[feat]=20#63=20todo=20graphic=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ui/todo/TodoContract.kt | 2 +- .../presentation/ui/todo/TodoScreen.kt | 132 ++++++++++------- .../main/res/drawable/img_no_peding_study.xml | 59 ++++++++ .../res/drawable/img_pending_study_zero.xml | 134 ++++++++++++++++++ 4 files changed, 271 insertions(+), 56 deletions(-) create mode 100644 app/src/main/res/drawable/img_no_peding_study.xml create mode 100644 app/src/main/res/drawable/img_pending_study_zero.xml diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoContract.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoContract.kt index f69f4141..6a852abc 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoContract.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoContract.kt @@ -124,7 +124,7 @@ class TodoContract { cardState = BbangZipCardState.COMPLETE, ), ), - val pendingCount: Int = 10, + val pendingCount: Int = 1, val remainingStudyCount: Int = 5, val completeCount: Int = 5, val todoFilterBottomSheetState: Boolean = false, diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt index 8280b5de..57a6e824 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt @@ -93,7 +93,7 @@ fun TodoScreen( item { Column(modifier = modifier.padding(horizontal = 16.dp)) { Image( - painter = painterResource (id = R.drawable.img_empty_view), + painter = painterResource(id = R.drawable.img_empty_view), contentDescription = null, modifier = Modifier .fillMaxWidth() @@ -284,81 +284,103 @@ fun DateMessageCard( .fillMaxWidth(), ) { Column(modifier = Modifier.fillMaxWidth()) { - Column( + Box( Modifier .background(color = BbangZipTheme.colors.backgroundAccent_FFDAA0, shape = RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp)) .fillMaxWidth() .height(LocalConfiguration.current.screenHeightDp.dp * (172f / 764f)) - .padding(start = 24.dp), ) { - Spacer(modifier = Modifier.height(44.dp)) - - Row( - verticalAlignment = Alignment.CenterVertically, - modifier = Modifier.padding(start = 8.dp), - ) { - Text( - text = todayDate[0].toInt().toString(), - style = BbangZipTheme.typography.title3Bold, - color = BbangZipTheme.colors.labelNormal_282119, + if (pendingCount == 0) { + Image( + painter = painterResource(R.drawable.img_pending_study_zero), + contentDescription = null, + modifier = Modifier + .fillMaxSize() + .aspectRatio(360f / 172f) ) - - Text( - text = stringResource(R.string.todo_month_text), - style = BbangZipTheme.typography.headline1Bold, - color = BbangZipTheme.colors.labelAlternative_282119_61, + }else{ + Image( + painter = painterResource(R.drawable.img_no_peding_study), + contentDescription = null, + modifier = Modifier + .fillMaxSize() + .aspectRatio(360f / 172f) ) + } + Column( + modifier = Modifier.padding(start = 24.dp), + ) { + Spacer(modifier = Modifier.height(44.dp)) - Spacer(modifier = Modifier.width(8.dp)) + Row( + verticalAlignment = Alignment.CenterVertically, + ) { + if(pendingCount != 0) Spacer(modifier = Modifier.width(8.dp)) + Text( + text = todayDate[0].toInt().toString(), + style = BbangZipTheme.typography.title3Bold, + color = BbangZipTheme.colors.labelNormal_282119, + ) - Text( - text = todayDate[1].toInt().toString(), - style = BbangZipTheme.typography.title3Bold, - color = BbangZipTheme.colors.labelNormal_282119, - ) + Text( + text = stringResource(R.string.todo_month_text), + style = BbangZipTheme.typography.headline1Bold, + color = BbangZipTheme.colors.labelAlternative_282119_61, + ) - Text( - text = stringResource(R.string.todo_day_text), - style = BbangZipTheme.typography.headline1Bold, - color = BbangZipTheme.colors.labelAlternative_282119_61, - ) + Spacer(modifier = Modifier.width(8.dp)) - Spacer(modifier = Modifier.width(8.dp)) + Text( + text = todayDate[1].toInt().toString(), + style = BbangZipTheme.typography.title3Bold, + color = BbangZipTheme.colors.labelNormal_282119, + ) - Text( - text = todayDate[2], - style = BbangZipTheme.typography.body1Bold, - color = BbangZipTheme.colors.labelNormal_282119, - ) - } + Text( + text = stringResource(R.string.todo_day_text), + style = BbangZipTheme.typography.headline1Bold, + color = BbangZipTheme.colors.labelAlternative_282119_61, + ) - Spacer(modifier = modifier.height(8.dp)) + Spacer(modifier = Modifier.width(8.dp)) - if (pendingCount == 0) { - Text( - text = stringResource(R.string.todo_pending_count_text), - style = BbangZipTheme.typography.headline1Bold, - color = BbangZipTheme.colors.labelAlternative_282119_61, - ) + Text( + text = todayDate[2], + style = BbangZipTheme.typography.body1Bold, + color = BbangZipTheme.colors.labelNormal_282119, + ) + } - Spacer(modifier = Modifier.height(62.dp)) - } else { - BbangZipButton( - bbangZipButtonType = BbangZipButtonType.Outlined, - bbangZipButtonSize = BbangZipButtonSize.Medium, - onClick = { onAddPendingStudyButtonClicked() }, - label = String.format(stringResource(R.string.btn_todo_overdue_label), pendingCount), - trailingIcon = R.drawable.ic_chevronright_thick_small_24, - modifier = Modifier.wrapContentSize(), - ) + Spacer(modifier = modifier.height(8.dp)) + + if (pendingCount == 0) { + Text( + text = stringResource(R.string.todo_pending_count_text), + style = BbangZipTheme.typography.headline1Bold, + color = BbangZipTheme.colors.labelAlternative_282119_61, + ) + + Spacer(modifier = Modifier.height(62.dp)) + } else { + BbangZipButton( + bbangZipButtonType = BbangZipButtonType.Outlined, + bbangZipButtonSize = BbangZipButtonSize.Medium, + onClick = { onAddPendingStudyButtonClicked() }, + label = String.format(stringResource(R.string.btn_todo_overdue_label), pendingCount), + trailingIcon = R.drawable.ic_chevronright_thick_small_24, + modifier = Modifier.wrapContentSize(), + ) - Spacer(modifier = Modifier.height(48.dp)) + Spacer(modifier = Modifier.height(48.dp)) + } } } Spacer(modifier = Modifier.height(24.dp)) } + + TopTailBalloon( text = stringResource(R.string.todo_top_tail_balloon_text), leadingIcon = { @@ -749,7 +771,7 @@ fun TodoScreenMockPreview() { ), TodoContract.TodoState( todoList = mockToDoList, - pendingCount = 0, + pendingCount = 2, remainingStudyCount = 2, completeCount = 2, screenType = ToDoScreenType.EMPTY, diff --git a/app/src/main/res/drawable/img_no_peding_study.xml b/app/src/main/res/drawable/img_no_peding_study.xml new file mode 100644 index 00000000..9b1e344a --- /dev/null +++ b/app/src/main/res/drawable/img_no_peding_study.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/img_pending_study_zero.xml b/app/src/main/res/drawable/img_pending_study_zero.xml new file mode 100644 index 00000000..37c77419 --- /dev/null +++ b/app/src/main/res/drawable/img_pending_study_zero.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + From f400d6b02c79ea07405597469f58ba59a4f15adf Mon Sep 17 00:00:00 2001 From: beom84 Date: Thu, 23 Jan 2025 19:47:42 +0900 Subject: [PATCH 06/13] =?UTF-8?q?[chore]=20#63=20todo=20code=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ui/todo/TodoScreen.kt | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt index 57a6e824..2729f4c2 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt @@ -298,7 +298,7 @@ fun DateMessageCard( .fillMaxSize() .aspectRatio(360f / 172f) ) - }else{ + } else { Image( painter = painterResource(R.drawable.img_no_peding_study), contentDescription = null, @@ -309,13 +309,13 @@ fun DateMessageCard( } Column( modifier = Modifier.padding(start = 24.dp), - ) { + ) { Spacer(modifier = Modifier.height(44.dp)) Row( verticalAlignment = Alignment.CenterVertically, ) { - if(pendingCount != 0) Spacer(modifier = Modifier.width(8.dp)) + if (pendingCount != 0) Spacer(modifier = Modifier.width(8.dp)) Text( text = todayDate[0].toInt().toString(), style = BbangZipTheme.typography.title3Bold, @@ -490,22 +490,6 @@ fun DeleteAndFilterIcons( } } -@Composable -fun EmptyView( - modifier: Modifier = Modifier, -) { - Box( - modifier = - modifier - .fillMaxWidth() - .height(328.dp) - .background(color = BbangZipTheme.colors.backgroundAlternative_F5F5F5, shape = RoundedCornerShape(size = 32.dp)), - contentAlignment = Alignment.Center, - ) { - Text(text = "Empty View") - } -} - @OptIn(ExperimentalMaterial3Api::class) @Composable fun BbangZipToDoFilterPickerBottomSheet( @@ -536,6 +520,7 @@ fun BbangZipToDoFilterPickerBottomSheet( modifier = Modifier .fillMaxWidth() + .applyFilterOnClick { onSelectedItemChanged(item) } .background( color = if (item != selectedItem) BbangZipTheme.colors.staticWhite_FFFFFF else BbangZipTheme.colors.fillStrong_68645E_16, From 0c959b73991d1ccefa35c840040022d89f570835 Mon Sep 17 00:00:00 2001 From: beom84 Date: Fri, 24 Jan 2025 03:58:30 +0900 Subject: [PATCH 07/13] =?UTF-8?q?[feat]=20#63=20subject=20category=20?= =?UTF-8?q?=EA=B7=B8=EB=9E=98=ED=94=BD=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybadgecategory/MyBadgeCategoryScreen.kt | 75 ++- .../presentation/ui/subject/SubjectScreen.kt | 10 + .../presentation/ui/todo/TodoScreen.kt | 41 +- .../main/res/drawable/img_mypage_header.xml | 59 ++ .../main/res/drawable/img_subject_header.xml | 607 ++++++++++++++++++ 5 files changed, 746 insertions(+), 46 deletions(-) create mode 100644 app/src/main/res/drawable/img_mypage_header.xml create mode 100644 app/src/main/res/drawable/img_subject_header.xml diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt index 11ec9725..48b0f1fc 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt @@ -1,6 +1,7 @@ package org.android.bbangzip.presentation.ui.my.mybadgecategory import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement @@ -27,6 +28,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -57,9 +59,9 @@ fun MyBadgeCategoryScreen( } LazyColumn( modifier = - modifier - .fillMaxWidth() - .background(BbangZipTheme.colors.staticWhite_FFFFFF), + modifier + .fillMaxWidth() + .background(BbangZipTheme.colors.staticWhite_FFFFFF), state = scrollState, ) { stickyHeader { @@ -73,23 +75,36 @@ fun MyBadgeCategoryScreen( } item { - Column( + Box( modifier = - Modifier - .fillMaxWidth() - .background( - color = BbangZipTheme.colors.backgroundAccent_FFDAA0, - shape = RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp), - ), + Modifier + .fillMaxWidth() + .background( + color = BbangZipTheme.colors.backgroundAccent_FFDAA0, + shape = RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp), + ) ) { - Text( - text = stringResource(R.string.badge_category_title, "밍밍"), - style = BbangZipTheme.typography.heading2Bold, - color = BbangZipTheme.colors.labelNormal_282119, + Image( + painter = painterResource(R.drawable.img_mypage_header), + contentDescription = null, + modifier = Modifier + .fillMaxSize() + .aspectRatio(360f / 161f) + ) + Column( modifier = + Modifier + .fillMaxWidth(), + ) { + Text( + text = stringResource(R.string.badge_category_title, "밍밍"), + style = BbangZipTheme.typography.heading2Bold, + color = BbangZipTheme.colors.labelNormal_282119, + modifier = Modifier .padding(start = 24.dp, top = 28.dp, bottom = 48.dp), - ) + ) + } } Spacer(Modifier.height(48.dp)) @@ -157,10 +172,10 @@ fun BadgeCategoryGridList( Column( modifier = - modifier - .padding(horizontal = 20.dp) - .fillMaxWidth() - .background(BbangZipTheme.colors.staticWhite_FFFFFF), + modifier + .padding(horizontal = 20.dp) + .fillMaxWidth() + .background(BbangZipTheme.colors.staticWhite_FFFFFF), ) { Text( text = badgeCategoryTitle, @@ -180,10 +195,10 @@ fun BadgeCategoryGridList( LazyVerticalGrid( modifier = - Modifier - .padding(horizontal = 16.dp) - .fillMaxSize() - .heightIn(max = (badgeHeight * (badgeCategoryList.size - 1 / 3 + 1) + 20 * (badgeCategoryList.size / 3)).dp), + Modifier + .padding(horizontal = 16.dp) + .fillMaxSize() + .heightIn(max = (badgeHeight * (badgeCategoryList.size - 1 / 3 + 1) + 20 * (badgeCategoryList.size / 3)).dp), columns = GridCells.Fixed(3), horizontalArrangement = Arrangement.spacedBy(32.dp), verticalArrangement = Arrangement.spacedBy(20.dp), @@ -191,10 +206,10 @@ fun BadgeCategoryGridList( items(badgeCategoryList.size) { index -> Box( modifier = - Modifier - .aspectRatio(1f) - .clip(RoundedCornerShape(24.dp)) - .clickable { onBadgeCardClicked(badgeCategoryList[index].name) }, + Modifier + .aspectRatio(1f) + .clip(RoundedCornerShape(24.dp)) + .clickable { onBadgeCardClicked(badgeCategoryList[index].name) }, contentAlignment = Alignment.Center, ) { if (badgeCategoryList[index].isLocked) { @@ -206,9 +221,9 @@ fun BadgeCategoryGridList( model = badgeCategoryList[index].imageUrl, contentDescription = null, modifier = - Modifier - .fillMaxSize() - .clip(RoundedCornerShape(24.dp)), + Modifier + .fillMaxSize() + .clip(RoundedCornerShape(24.dp)), ) } } diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt index 64361bd1..1a7c71bb 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt @@ -1,5 +1,6 @@ package org.android.bbangzip.presentation.ui.subject +import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -7,6 +8,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -21,6 +23,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.tooling.preview.Preview @@ -74,6 +77,13 @@ fun SubjectScreen( .height(backgroundHeight.dp) .background(color = BbangZipTheme.colors.backgroundAccent_FFDAA0, shape = RoundedCornerShape(bottomStart = 32.dp, bottomEnd = 32.dp)), ) { + Image( + painter = painterResource(R.drawable.img_subject_header), + contentDescription = null, + modifier = Modifier + .fillMaxSize() + .aspectRatio(360f / 220f) + ) Row( modifier = modifier diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt index d66e29c4..aae8bbc9 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt @@ -1,12 +1,16 @@ package org.android.bbangzip.presentation.ui.todo +import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -15,6 +19,7 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.ExperimentalMaterial3Api @@ -26,8 +31,10 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource +import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import org.android.bbangzip.R @@ -41,7 +48,9 @@ import org.android.bbangzip.presentation.type.BbangZipButtonSize import org.android.bbangzip.presentation.type.BbangZipButtonType import org.android.bbangzip.presentation.type.ToDoFilterType import org.android.bbangzip.presentation.type.ToDoScreenType +import org.android.bbangzip.presentation.ui.subject.subjectdetail.RevertCompleteBottomSheet import org.android.bbangzip.presentation.ui.todo.component.ToDoFilterPickerBottomSheet +import org.android.bbangzip.presentation.util.modifier.applyFilterOnClick import org.android.bbangzip.ui.theme.BbangZipTheme @Composable @@ -66,10 +75,10 @@ fun TodoScreen( ) { Box( modifier = - modifier - .fillMaxSize() - .padding(bottom = bottomPadding.calculateBottomPadding()) - .background(color = BbangZipTheme.colors.staticWhite_FFFFFF), + modifier + .fillMaxSize() + .padding(bottom = bottomPadding.calculateBottomPadding()) + .background(color = BbangZipTheme.colors.staticWhite_FFFFFF), ) { LazyColumn { item { @@ -364,13 +373,12 @@ fun DateMessageCard( modifier = Modifier.wrapContentSize(), ) - Spacer(modifier = Modifier.height(48.dp)) + Spacer(modifier = Modifier.height(48.dp)) + } } } - Spacer(modifier = Modifier.height(24.dp)) } - TopTailBalloon( text = stringResource(R.string.todo_top_tail_balloon_text), leadingIcon = { @@ -441,18 +449,18 @@ fun DeleteAndFilterIcons( ) { Row( modifier = - modifier - .padding(horizontal = 16.dp) - .fillMaxWidth(), + modifier + .padding(horizontal = 16.dp) + .fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, ) { Spacer(modifier = Modifier.weight(1f)) Box( modifier = - Modifier - .clip(CircleShape) - .clickable { onDeleteIconClicked() }, + Modifier + .clip(CircleShape) + .clickable { onDeleteIconClicked() }, contentAlignment = Alignment.Center, ) { Icon( @@ -465,9 +473,9 @@ fun DeleteAndFilterIcons( Box( modifier = - Modifier - .clip(CircleShape) - .clickable { onFilterIconClicked() }, + Modifier + .clip(CircleShape) + .clickable { onFilterIconClicked() }, contentAlignment = Alignment.Center, ) { Icon( @@ -759,3 +767,4 @@ fun TodoScreenMockPreview() { bottomPadding = PaddingValues(), ) } + diff --git a/app/src/main/res/drawable/img_mypage_header.xml b/app/src/main/res/drawable/img_mypage_header.xml new file mode 100644 index 00000000..4d8a5260 --- /dev/null +++ b/app/src/main/res/drawable/img_mypage_header.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/img_subject_header.xml b/app/src/main/res/drawable/img_subject_header.xml new file mode 100644 index 00000000..6341c8fc --- /dev/null +++ b/app/src/main/res/drawable/img_subject_header.xml @@ -0,0 +1,607 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 46630559c8614235a35fa387f97b79467afc34f0 Mon Sep 17 00:00:00 2001 From: beom84 Date: Fri, 24 Jan 2025 04:04:18 +0900 Subject: [PATCH 08/13] =?UTF-8?q?[feat]=20#63=20todo=20=EB=B0=80=EB=A0=B8?= =?UTF-8?q?=EC=9D=84=EB=8C=B8=20graphic=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ui/todo/TodoScreen.kt | 4 +- .../res/drawable/img_pending_study_zero.xml | 134 ------------------ .../img_pending_study_zero_header.xml | 45 ++++++ 3 files changed, 47 insertions(+), 136 deletions(-) delete mode 100644 app/src/main/res/drawable/img_pending_study_zero.xml create mode 100644 app/src/main/res/drawable/img_pending_study_zero_header.xml diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt index aae8bbc9..db09ab00 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt @@ -290,11 +290,11 @@ fun DateMessageCard( Modifier .background(color = BbangZipTheme.colors.backgroundAccent_FFDAA0, shape = RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp)) .fillMaxWidth() - .height(LocalConfiguration.current.screenHeightDp.dp * (172f / 764f)) + .height(LocalConfiguration.current.screenHeightDp.dp * (172f / 800f)) ) { if (pendingCount == 0) { Image( - painter = painterResource(R.drawable.img_pending_study_zero), + painter = painterResource(R.drawable.img_pending_study_zero_header), contentDescription = null, modifier = Modifier .fillMaxSize() diff --git a/app/src/main/res/drawable/img_pending_study_zero.xml b/app/src/main/res/drawable/img_pending_study_zero.xml deleted file mode 100644 index 37c77419..00000000 --- a/app/src/main/res/drawable/img_pending_study_zero.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/img_pending_study_zero_header.xml b/app/src/main/res/drawable/img_pending_study_zero_header.xml new file mode 100644 index 00000000..be207e01 --- /dev/null +++ b/app/src/main/res/drawable/img_pending_study_zero_header.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + From e934aefa435ddb6e44fa73541b6c50724eddd8a6 Mon Sep 17 00:00:00 2001 From: beom84 Date: Fri, 24 Jan 2025 04:13:21 +0900 Subject: [PATCH 09/13] =?UTF-8?q?[feat]=20#63=20graphic=20clip=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../android/bbangzip/presentation/ui/todo/TodoScreen.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt index db09ab00..1838e095 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt @@ -297,15 +297,16 @@ fun DateMessageCard( painter = painterResource(R.drawable.img_pending_study_zero_header), contentDescription = null, modifier = Modifier - .fillMaxSize() + .fillMaxWidth() .aspectRatio(360f / 172f) + .clip(RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp)), ) } else { Image( painter = painterResource(R.drawable.img_no_peding_study), contentDescription = null, modifier = Modifier - .fillMaxSize() + .fillMaxWidth() .aspectRatio(360f / 172f) ) } @@ -754,7 +755,7 @@ fun TodoScreenMockPreview() { ), TodoContract.TodoState( todoList = mockToDoList, - pendingCount = 2, + pendingCount = 0, remainingStudyCount = 2, completeCount = 2, screenType = ToDoScreenType.EMPTY, From 518968727aba8d719f07f742d01d05a524998586 Mon Sep 17 00:00:00 2001 From: beom84 Date: Fri, 24 Jan 2025 14:08:57 +0900 Subject: [PATCH 10/13] =?UTF-8?q?[feat]=20#70=20subjectDetail=20graphic=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybadgecategory/MyBadgeCategoryScreen.kt | 2 +- .../subjectdetail/SubjectDetatilScreen.kt | 13 ++ .../presentation/ui/todo/TodoScreen.kt | 4 +- .../main/res/drawable/img_mypage_header.xml | 24 ++-- .../res/drawable/img_pending_study_zero.xml | 134 ++++++++++++++++++ ...ader.xml => img_subject_detail_header.xml} | 0 6 files changed, 161 insertions(+), 16 deletions(-) create mode 100644 app/src/main/res/drawable/img_pending_study_zero.xml rename app/src/main/res/drawable/{img_pending_study_zero_header.xml => img_subject_detail_header.xml} (100%) diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt index 48b0f1fc..0a46f3ce 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt @@ -89,7 +89,7 @@ fun MyBadgeCategoryScreen( contentDescription = null, modifier = Modifier .fillMaxSize() - .aspectRatio(360f / 161f) + .aspectRatio(360f / 121f) ) Column( modifier = diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt index 0904f15a..a497562f 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt @@ -1,5 +1,6 @@ package org.android.bbangzip.presentation.ui.subject.subjectdetail +import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement @@ -8,6 +9,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -32,8 +34,10 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalConfiguration +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.text.AnnotatedString @@ -117,6 +121,15 @@ fun SubjectDetailScreen( shape = RoundedCornerShape(bottomStart = 32.dp, bottomEnd = 32.dp), ), ) { + Image( + painter = painterResource(R.drawable.img_subject_detail_header), + contentDescription = null, + modifier = Modifier + .fillMaxSize() + .aspectRatio(360f / 172f) + .clip(shape = RoundedCornerShape(bottomStart = 40.dp, bottomEnd = 40.dp)) + .align(Alignment.BottomCenter), + ) TwoLineTextWithWordWrap(motivationMessage) Box( diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt index 1838e095..1c1f43d2 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt @@ -48,8 +48,6 @@ import org.android.bbangzip.presentation.type.BbangZipButtonSize import org.android.bbangzip.presentation.type.BbangZipButtonType import org.android.bbangzip.presentation.type.ToDoFilterType import org.android.bbangzip.presentation.type.ToDoScreenType -import org.android.bbangzip.presentation.ui.subject.subjectdetail.RevertCompleteBottomSheet -import org.android.bbangzip.presentation.ui.todo.component.ToDoFilterPickerBottomSheet import org.android.bbangzip.presentation.util.modifier.applyFilterOnClick import org.android.bbangzip.ui.theme.BbangZipTheme @@ -294,7 +292,7 @@ fun DateMessageCard( ) { if (pendingCount == 0) { Image( - painter = painterResource(R.drawable.img_pending_study_zero_header), + painter = painterResource(R.drawable.img_pending_study_zero), contentDescription = null, modifier = Modifier .fillMaxWidth() diff --git a/app/src/main/res/drawable/img_mypage_header.xml b/app/src/main/res/drawable/img_mypage_header.xml index 4d8a5260..9297de8c 100644 --- a/app/src/main/res/drawable/img_mypage_header.xml +++ b/app/src/main/res/drawable/img_mypage_header.xml @@ -1,20 +1,20 @@ + android:viewportHeight="132"> diff --git a/app/src/main/res/drawable/img_pending_study_zero.xml b/app/src/main/res/drawable/img_pending_study_zero.xml new file mode 100644 index 00000000..3f26a46c --- /dev/null +++ b/app/src/main/res/drawable/img_pending_study_zero.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/img_pending_study_zero_header.xml b/app/src/main/res/drawable/img_subject_detail_header.xml similarity index 100% rename from app/src/main/res/drawable/img_pending_study_zero_header.xml rename to app/src/main/res/drawable/img_subject_detail_header.xml From 265815042f9e10d9d8a5c54dde24e501a3b7c9f0 Mon Sep 17 00:00:00 2001 From: beom84 Date: Fri, 24 Jan 2025 14:15:08 +0900 Subject: [PATCH 11/13] =?UTF-8?q?[feat]=20#70=20subjectDetail=20graphic=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/subject/subjectdetail/SubjectDetatilScreen.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt index b3f7123e..8d4ec5aa 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt @@ -123,13 +123,14 @@ fun SubjectDetailScreen( .height(backgroundHeight.dp) .background( color = BbangZipTheme.colors.backgroundAccent_FFDAA0, - shape = RoundedCornerShape(bottomStart = 32.dp, bottomEnd = 32.dp), + shape = RoundedCornerShape(bottomStart = 40.dp, bottomEnd = 40.dp), ), ) { Image( painter = painterResource(R.drawable.img_subject_detail_header), contentDescription = null, modifier = Modifier + .padding(top = 60.dp) .fillMaxSize() .aspectRatio(360f / 172f) .clip(shape = RoundedCornerShape(bottomStart = 40.dp, bottomEnd = 40.dp)) From 9e7d597968908247f9dff7247ab401e0d264df10 Mon Sep 17 00:00:00 2001 From: beom84 Date: Fri, 24 Jan 2025 14:17:24 +0900 Subject: [PATCH 12/13] =?UTF-8?q?[chore]=20#70=20ktlint=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/component/card/FriendCard.kt | 11 +- .../model/card/FriendCardModel.kt | 4 +- .../presentation/ui/friend/FriendContract.kt | 14 +- .../presentation/ui/friend/FriendScreen.kt | 2 +- .../mybadgecategory/MyBadgeCategoryScreen.kt | 63 ++++---- .../onboardingend/OnboardingEndScreen.kt | 33 ++-- .../onboardingstart/OnboardingStartScreen.kt | 20 +-- .../presentation/ui/subject/SubjectScreen.kt | 7 +- .../subjectdetail/SubjectDetatilScreen.kt | 13 +- .../presentation/ui/todo/TodoScreen.kt | 141 +++++++++--------- 10 files changed, 156 insertions(+), 152 deletions(-) diff --git a/app/src/main/java/org/android/bbangzip/presentation/component/card/FriendCard.kt b/app/src/main/java/org/android/bbangzip/presentation/component/card/FriendCard.kt index d09f3c82..b9d752a1 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/component/card/FriendCard.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/component/card/FriendCard.kt @@ -73,11 +73,12 @@ fun FriendCard( painter = painterResource(id = data.imgSrc), contentDescription = null, contentScale = ContentScale.FillBounds, - modifier = Modifier.size(48.dp).clip(CircleShape).border( - width = 1.dp, - color = BbangZipTheme.colors.lineNormal_68645E_22, - shape = CircleShape, - ), + modifier = + Modifier.size(48.dp).clip(CircleShape).border( + width = 1.dp, + color = BbangZipTheme.colors.lineNormal_68645E_22, + shape = CircleShape, + ), ) Spacer(modifier = Modifier.width(16.dp)) diff --git a/app/src/main/java/org/android/bbangzip/presentation/model/card/FriendCardModel.kt b/app/src/main/java/org/android/bbangzip/presentation/model/card/FriendCardModel.kt index fb50c24e..61d405f8 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/model/card/FriendCardModel.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/model/card/FriendCardModel.kt @@ -11,5 +11,5 @@ data class FriendCardModel( val friendName: String, val imageUrl: String, val state: BbangZipCardState, - @DrawableRes val imgSrc : Int = 0, - ) : Parcelable + @DrawableRes val imgSrc: Int = 0, +) : Parcelable diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendContract.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendContract.kt index 26b5c8d0..2d919caf 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendContract.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendContract.kt @@ -18,49 +18,49 @@ class FriendContract { friendName = "이승범", imageUrl = "https://example.com/alice.jpg", state = BbangZipCardState.DEFAULT, - imgSrc = R.drawable.img_friend_profile_1 + imgSrc = R.drawable.img_friend_profile_1, ), FriendCardModel( friendId = 2, friendName = "김재민", imageUrl = "https://example.com/bob.jpg", state = BbangZipCardState.DEFAULT, - imgSrc = R.drawable.img_friend_profile_2 + imgSrc = R.drawable.img_friend_profile_2, ), FriendCardModel( friendId = 3, friendName = "하지은", imageUrl = "https://example.com/charlie.jpg", state = BbangZipCardState.DEFAULT, - imgSrc = R.drawable.img_friend_profile_3 + imgSrc = R.drawable.img_friend_profile_3, ), FriendCardModel( friendId = 4, friendName = "신우연", imageUrl = "https://example.com/alice.jpg", state = BbangZipCardState.DEFAULT, - imgSrc = R.drawable.img_friend_profile_4 + imgSrc = R.drawable.img_friend_profile_4, ), FriendCardModel( friendId = 5, friendName = "김재민", imageUrl = "https://example.com/bob.jpg", state = BbangZipCardState.DEFAULT, - imgSrc = R.drawable.img_friend_profile_1 + imgSrc = R.drawable.img_friend_profile_1, ), FriendCardModel( friendId = 6, friendName = "하지은", imageUrl = "https://example.com/charlie.jpg", state = BbangZipCardState.DEFAULT, - imgSrc = R.drawable.img_friend_profile_2 + imgSrc = R.drawable.img_friend_profile_2, ), FriendCardModel( friendId = 7, friendName = "이승범", imageUrl = "https://example.com/alice.jpg", state = BbangZipCardState.DEFAULT, - imgSrc = R.drawable.img_friend_profile_3 + imgSrc = R.drawable.img_friend_profile_3, ), ), val menuFilterType: FriendMenuType = FriendMenuType.ALL, diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendScreen.kt index 8a1650e8..116f28ae 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/friend/FriendScreen.kt @@ -124,7 +124,7 @@ fun FriendScreen( modifier = Modifier .fillMaxWidth() - .padding(bottom=24.dp, start = 24.dp, end = 24.dp), + .padding(bottom = 24.dp, start = 24.dp, end = 24.dp), ) { Text( text = stringResource(R.string.friend_boss_count, friendState.friendList.size), diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt index 0a46f3ce..86f5ac9d 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/my/mybadgecategory/MyBadgeCategoryScreen.kt @@ -59,9 +59,9 @@ fun MyBadgeCategoryScreen( } LazyColumn( modifier = - modifier - .fillMaxWidth() - .background(BbangZipTheme.colors.staticWhite_FFFFFF), + modifier + .fillMaxWidth() + .background(BbangZipTheme.colors.staticWhite_FFFFFF), state = scrollState, ) { stickyHeader { @@ -77,32 +77,33 @@ fun MyBadgeCategoryScreen( item { Box( modifier = - Modifier - .fillMaxWidth() - .background( - color = BbangZipTheme.colors.backgroundAccent_FFDAA0, - shape = RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp), - ) + Modifier + .fillMaxWidth() + .background( + color = BbangZipTheme.colors.backgroundAccent_FFDAA0, + shape = RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp), + ), ) { Image( painter = painterResource(R.drawable.img_mypage_header), contentDescription = null, - modifier = Modifier - .fillMaxSize() - .aspectRatio(360f / 121f) + modifier = + Modifier + .fillMaxSize() + .aspectRatio(360f / 121f), ) Column( modifier = - Modifier - .fillMaxWidth(), + Modifier + .fillMaxWidth(), ) { Text( text = stringResource(R.string.badge_category_title, "밍밍"), style = BbangZipTheme.typography.heading2Bold, color = BbangZipTheme.colors.labelNormal_282119, modifier = - Modifier - .padding(start = 24.dp, top = 28.dp, bottom = 48.dp), + Modifier + .padding(start = 24.dp, top = 28.dp, bottom = 48.dp), ) } } @@ -172,10 +173,10 @@ fun BadgeCategoryGridList( Column( modifier = - modifier - .padding(horizontal = 20.dp) - .fillMaxWidth() - .background(BbangZipTheme.colors.staticWhite_FFFFFF), + modifier + .padding(horizontal = 20.dp) + .fillMaxWidth() + .background(BbangZipTheme.colors.staticWhite_FFFFFF), ) { Text( text = badgeCategoryTitle, @@ -195,10 +196,10 @@ fun BadgeCategoryGridList( LazyVerticalGrid( modifier = - Modifier - .padding(horizontal = 16.dp) - .fillMaxSize() - .heightIn(max = (badgeHeight * (badgeCategoryList.size - 1 / 3 + 1) + 20 * (badgeCategoryList.size / 3)).dp), + Modifier + .padding(horizontal = 16.dp) + .fillMaxSize() + .heightIn(max = (badgeHeight * (badgeCategoryList.size - 1 / 3 + 1) + 20 * (badgeCategoryList.size / 3)).dp), columns = GridCells.Fixed(3), horizontalArrangement = Arrangement.spacedBy(32.dp), verticalArrangement = Arrangement.spacedBy(20.dp), @@ -206,10 +207,10 @@ fun BadgeCategoryGridList( items(badgeCategoryList.size) { index -> Box( modifier = - Modifier - .aspectRatio(1f) - .clip(RoundedCornerShape(24.dp)) - .clickable { onBadgeCardClicked(badgeCategoryList[index].name) }, + Modifier + .aspectRatio(1f) + .clip(RoundedCornerShape(24.dp)) + .clickable { onBadgeCardClicked(badgeCategoryList[index].name) }, contentAlignment = Alignment.Center, ) { if (badgeCategoryList[index].isLocked) { @@ -221,9 +222,9 @@ fun BadgeCategoryGridList( model = badgeCategoryList[index].imageUrl, contentDescription = null, modifier = - Modifier - .fillMaxSize() - .clip(RoundedCornerShape(24.dp)), + Modifier + .fillMaxSize() + .clip(RoundedCornerShape(24.dp)), ) } } diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingend/OnboardingEndScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingend/OnboardingEndScreen.kt index c2136e7c..a7ac1aaa 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingend/OnboardingEndScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingend/OnboardingEndScreen.kt @@ -5,7 +5,6 @@ import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.aspectRatio -import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding @@ -31,9 +30,9 @@ fun OnboardingEndScreen( ) { Column( modifier = - Modifier - .fillMaxWidth() - .background(color = BbangZipTheme.colors.backgroundNormal_FFFFFF), + Modifier + .fillMaxWidth() + .background(color = BbangZipTheme.colors.backgroundNormal_FFFFFF), ) { BbangZipBaseTopBar( leadingIcon = R.drawable.ic_chevronleft_thick_small_24, @@ -43,30 +42,30 @@ fun OnboardingEndScreen( Text( text = stringResource(id = R.string.onboarding_final_title), modifier = - Modifier - .fillMaxWidth() - .padding(start = 16.dp, end = 16.dp) - .padding(top = (LocalConfiguration.current.screenHeightDp * 0.081).dp), + Modifier + .fillMaxWidth() + .padding(start = 16.dp, end = 16.dp) + .padding(top = (LocalConfiguration.current.screenHeightDp * 0.081).dp), style = BbangZipTheme.typography.title2Bold, color = BbangZipTheme.colors.labelNormal_282119, ) Spacer(modifier = Modifier.height(32.dp)) - Image( painter = painterResource(id = R.drawable.img_onboarding_end), - modifier = Modifier - .fillMaxWidth() - .aspectRatio(8f / 9f), + modifier = + Modifier + .fillMaxWidth() + .aspectRatio(8f / 9f), contentDescription = null, ) Spacer(modifier = Modifier.weight(1f)) - BbangZipButton( - modifier = Modifier - .fillMaxWidth() - .padding(start = 16.dp, end = 16.dp, bottom = 16.dp), + modifier = + Modifier + .fillMaxWidth() + .padding(start = 16.dp, end = 16.dp, bottom = 16.dp), bbangZipButtonType = BbangZipButtonType.Solid, bbangZipButtonSize = BbangZipButtonSize.Large, onClick = { onClickNextBtn() }, @@ -80,4 +79,4 @@ fun OnboardingEndScreen( @Composable private fun OnboardingEndScreenPreview() { OnboardingEndScreen() -} \ No newline at end of file +} diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt index bb62b038..0f994e1f 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/onboarding/onboardingstart/OnboardingStartScreen.kt @@ -8,7 +8,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -30,16 +29,16 @@ fun OnboardingStartScreen( ) { Column( modifier = - Modifier - .fillMaxSize() - .padding(start = 16.dp, end = 16.dp, bottom = 16.dp), + Modifier + .fillMaxSize() + .padding(start = 16.dp, end = 16.dp, bottom = 16.dp), ) { Text( text = stringResource(id = R.string.onboarding_start_title), modifier = - Modifier - .fillMaxWidth() - .padding(top = (LocalConfiguration.current.screenHeightDp * 0.15).dp), + Modifier + .fillMaxWidth() + .padding(top = (LocalConfiguration.current.screenHeightDp * 0.15).dp), style = BbangZipTheme.typography.title2Bold, color = BbangZipTheme.colors.labelNormal_282119, ) @@ -49,9 +48,10 @@ fun OnboardingStartScreen( Image( painter = painterResource(id = R.drawable.img_onboarding_start), contentDescription = null, - modifier = Modifier - .fillMaxWidth() - .aspectRatio(8f / 9f) + modifier = + Modifier + .fillMaxWidth() + .aspectRatio(8f / 9f), ) Spacer(modifier = Modifier.weight(1f)) diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt index a7945c6f..eed64b46 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt @@ -81,9 +81,10 @@ fun SubjectScreen( Image( painter = painterResource(R.drawable.img_subject_header), contentDescription = null, - modifier = Modifier - .fillMaxSize() - .aspectRatio(360f / 220f) + modifier = + Modifier + .fillMaxSize() + .aspectRatio(360f / 220f), ) Row( modifier = diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt index 8d4ec5aa..c71177dc 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt @@ -129,12 +129,13 @@ fun SubjectDetailScreen( Image( painter = painterResource(R.drawable.img_subject_detail_header), contentDescription = null, - modifier = Modifier - .padding(top = 60.dp) - .fillMaxSize() - .aspectRatio(360f / 172f) - .clip(shape = RoundedCornerShape(bottomStart = 40.dp, bottomEnd = 40.dp)) - .align(Alignment.BottomCenter), + modifier = + Modifier + .padding(top = 60.dp) + .fillMaxSize() + .aspectRatio(360f / 172f) + .clip(shape = RoundedCornerShape(bottomStart = 40.dp, bottomEnd = 40.dp)) + .align(Alignment.BottomCenter), ) TwoLineTextWithWordWrap(motivationMessage) diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt index 1c1f43d2..2e47ee99 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/todo/TodoScreen.kt @@ -73,10 +73,10 @@ fun TodoScreen( ) { Box( modifier = - modifier - .fillMaxSize() - .padding(bottom = bottomPadding.calculateBottomPadding()) - .background(color = BbangZipTheme.colors.staticWhite_FFFFFF), + modifier + .fillMaxSize() + .padding(bottom = bottomPadding.calculateBottomPadding()) + .background(color = BbangZipTheme.colors.staticWhite_FFFFFF), ) { LazyColumn { item { @@ -95,9 +95,10 @@ fun TodoScreen( Image( painter = painterResource(id = R.drawable.img_empty_view), contentDescription = null, - modifier = Modifier - .fillMaxWidth() - .aspectRatio(16f / 15f) + modifier = + Modifier + .fillMaxWidth() + .aspectRatio(16f / 15f), ) Spacer(modifier = Modifier.height(16.dp)) @@ -136,10 +137,10 @@ fun TodoScreen( item { Box( modifier = - Modifier - .padding(start = 24.dp) - .fillMaxWidth() - .height(58.dp), + Modifier + .padding(start = 24.dp) + .fillMaxWidth() + .height(58.dp), contentAlignment = Alignment.CenterStart, ) { Text( @@ -153,18 +154,18 @@ fun TodoScreen( Row( modifier = - Modifier - .padding(horizontal = 16.dp) - .fillMaxWidth(), + Modifier + .padding(horizontal = 16.dp) + .fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, ) { Spacer(modifier = Modifier.weight(1f)) Box( modifier = - Modifier - .clip(CircleShape) - .clickable { onCloseIconClicked() }, + Modifier + .clip(CircleShape) + .clickable { onCloseIconClicked() }, contentAlignment = Alignment.Center, ) { Icon( @@ -243,11 +244,11 @@ fun TodoScreen( onClick = { onItemDeleteButtonClicked() }, label = stringResource(R.string.todo_delete_screen_delete_button_text, todoState.selectedItemList.size), modifier = - Modifier - .padding(horizontal = 16.dp) - .fillMaxWidth() - .align(Alignment.BottomCenter) - .padding(bottom = 16.dp), + Modifier + .padding(horizontal = 16.dp) + .fillMaxWidth() + .align(Alignment.BottomCenter) + .padding(bottom = 16.dp), isEnable = todoState.selectedItemList.isNotEmpty(), trailingIcon = R.drawable.ic_trash_default_24, ) @@ -280,32 +281,34 @@ fun DateMessageCard( ) { Box( modifier = - modifier - .fillMaxWidth(), + modifier + .fillMaxWidth(), ) { Column(modifier = Modifier.fillMaxWidth()) { Box( Modifier .background(color = BbangZipTheme.colors.backgroundAccent_FFDAA0, shape = RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp)) .fillMaxWidth() - .height(LocalConfiguration.current.screenHeightDp.dp * (172f / 800f)) + .height(LocalConfiguration.current.screenHeightDp.dp * (172f / 800f)), ) { if (pendingCount == 0) { Image( painter = painterResource(R.drawable.img_pending_study_zero), contentDescription = null, - modifier = Modifier - .fillMaxWidth() - .aspectRatio(360f / 172f) - .clip(RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp)), + modifier = + Modifier + .fillMaxWidth() + .aspectRatio(360f / 172f) + .clip(RoundedCornerShape(bottomEnd = 32.dp, bottomStart = 32.dp)), ) } else { Image( painter = painterResource(R.drawable.img_no_peding_study), contentDescription = null, - modifier = Modifier - .fillMaxWidth() - .aspectRatio(360f / 172f) + modifier = + Modifier + .fillMaxWidth() + .aspectRatio(360f / 172f), ) } Column( @@ -404,35 +407,35 @@ fun StudyCountText( ) { Box( modifier = - modifier - .padding(horizontal = 16.dp) - .fillMaxWidth() - .height(58.dp), + modifier + .padding(horizontal = 16.dp) + .fillMaxWidth() + .height(58.dp), contentAlignment = Alignment.CenterStart, ) { Column( modifier = - Modifier - .padding(start = 8.dp), + Modifier + .padding(start = 8.dp), ) { Text( text = - when { - completeCount > 0 && remainingCount != 0 -> stringResource(R.string.todo_complete_count_text, completeCount) - remainingCount == 0 -> stringResource(R.string.todo_complete_remaining_nothing_text) - else -> stringResource(R.string.todo_complete_nothing_text) - }, + when { + completeCount > 0 && remainingCount != 0 -> stringResource(R.string.todo_complete_count_text, completeCount) + remainingCount == 0 -> stringResource(R.string.todo_complete_remaining_nothing_text) + else -> stringResource(R.string.todo_complete_nothing_text) + }, style = BbangZipTheme.typography.label1Bold, color = BbangZipTheme.colors.labelAlternative_282119_61, ) Text( text = - if (remainingCount != 0) { - stringResource(R.string.todo_remaing_count_text, remainingCount) - } else { - stringResource(R.string.todo_remaining_nothing_text) - }, + if (remainingCount != 0) { + stringResource(R.string.todo_remaing_count_text, remainingCount) + } else { + stringResource(R.string.todo_remaining_nothing_text) + }, style = BbangZipTheme.typography.title3Bold, color = BbangZipTheme.colors.labelNormal_282119, ) @@ -448,18 +451,18 @@ fun DeleteAndFilterIcons( ) { Row( modifier = - modifier - .padding(horizontal = 16.dp) - .fillMaxWidth(), + modifier + .padding(horizontal = 16.dp) + .fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, ) { Spacer(modifier = Modifier.weight(1f)) Box( modifier = - Modifier - .clip(CircleShape) - .clickable { onDeleteIconClicked() }, + Modifier + .clip(CircleShape) + .clickable { onDeleteIconClicked() }, contentAlignment = Alignment.Center, ) { Icon( @@ -472,9 +475,9 @@ fun DeleteAndFilterIcons( Box( modifier = - Modifier - .clip(CircleShape) - .clickable { onFilterIconClicked() }, + Modifier + .clip(CircleShape) + .clickable { onFilterIconClicked() }, contentAlignment = Alignment.Center, ) { Icon( @@ -515,15 +518,14 @@ fun BbangZipToDoFilterPickerBottomSheet( Text( text = item.filter, modifier = - Modifier - .fillMaxWidth() - - .applyFilterOnClick { onSelectedItemChanged(item) } - .background( - color = if (item != selectedItem) BbangZipTheme.colors.staticWhite_FFFFFF else BbangZipTheme.colors.fillStrong_68645E_16, - shape = RoundedCornerShape(16.dp), - ) - .padding(vertical = 8.dp), + Modifier + .fillMaxWidth() + .applyFilterOnClick { onSelectedItemChanged(item) } + .background( + color = if (item != selectedItem) BbangZipTheme.colors.staticWhite_FFFFFF else BbangZipTheme.colors.fillStrong_68645E_16, + shape = RoundedCornerShape(16.dp), + ) + .padding(vertical = 8.dp), textAlign = TextAlign.Center, style = BbangZipTheme.typography.body1Bold, color = BbangZipTheme.colors.labelNormal_282119, @@ -553,9 +555,9 @@ fun RevertCompleteBottomSheet( Text( text = bottomSheetTitle, modifier = - Modifier - .align(Alignment.CenterHorizontally) - .padding(vertical = 15.dp), + Modifier + .align(Alignment.CenterHorizontally) + .padding(vertical = 15.dp), style = BbangZipTheme.typography.headline1Bold, color = BbangZipTheme.colors.labelNeutral_282119_88, ) @@ -766,4 +768,3 @@ fun TodoScreenMockPreview() { bottomPadding = PaddingValues(), ) } - From 9c62ad046529591f1744893ae88ed2431dd8cda7 Mon Sep 17 00:00:00 2001 From: beom84 Date: Fri, 24 Jan 2025 14:41:39 +0900 Subject: [PATCH 13/13] =?UTF-8?q?[feat]=20#70=20detail=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 --- .../presentation/ui/subject/SubjectScreen.kt | 2 +- .../subjectdetail/SubjectDetatilScreen.kt | 3 +- .../main/res/drawable/img_subject_header.xml | 30 +++++++++---------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt index eed64b46..cb77ee14 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/SubjectScreen.kt @@ -374,7 +374,7 @@ private fun DeleteCardView( } } } else { - for (i in 0 until subjects.size / 2 + 1) { + for (i in 0 until subjects.size / 2) { Row( modifier = Modifier diff --git a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt index c71177dc..7ac17fb8 100644 --- a/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt +++ b/app/src/main/java/org/android/bbangzip/presentation/ui/subject/subjectdetail/SubjectDetatilScreen.kt @@ -575,8 +575,7 @@ fun TwoLineTextWithWordWrap( modifier = Modifier .width(200.dp) - .padding(top = 92.dp, start = 20.dp) - .height(56.dp), + .padding(top = 92.dp, start = 20.dp), style = BbangZipTheme.typography.heading2Bold, onTextLayout = { textLayoutResult -> if (displayText == null) { diff --git a/app/src/main/res/drawable/img_subject_header.xml b/app/src/main/res/drawable/img_subject_header.xml index 6341c8fc..63175fb3 100644 --- a/app/src/main/res/drawable/img_subject_header.xml +++ b/app/src/main/res/drawable/img_subject_header.xml @@ -19,7 +19,7 @@ android:fillColor="#ffffff" android:fillAlpha="0.4"/> @@ -94,7 +94,7 @@ android:fillColor="#FFB45A" android:fillAlpha="0.4"/> @@ -134,17 +134,17 @@ android:fillColor="#FFB45A" android:fillAlpha="0.4"/> @@ -204,17 +204,17 @@ android:fillColor="#FFB45A" android:fillAlpha="0.4"/> @@ -249,7 +249,7 @@ android:fillColor="#FFB45A" android:fillAlpha="0.4"/> @@ -299,7 +299,7 @@ android:fillColor="#FFB45A" android:fillAlpha="0.4"/> @@ -364,7 +364,7 @@ android:fillColor="#FFB45A" android:fillAlpha="0.4"/> @@ -374,12 +374,12 @@ android:fillColor="#FFB45A" android:fillAlpha="0.4"/> @@ -389,7 +389,7 @@ android:fillColor="#FFB45A" android:fillAlpha="0.4"/> @@ -459,7 +459,7 @@ android:fillColor="#FFB45A" android:fillAlpha="0.4"/>