-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Nexters/feature/camera-ui
[FEAT] [#7] 사진 가이드 화면 UI 구현
- Loading branch information
Showing
32 changed files
with
981 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
core/designsystem/src/main/kotlin/com/nexters/ilab/android/core/designsystem/theme/Font.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.nexters.ilab.android.core.designsystem.theme | ||
|
||
import androidx.compose.ui.text.TextStyle | ||
import androidx.compose.ui.text.font.Font | ||
import androidx.compose.ui.text.font.FontFamily | ||
import androidx.compose.ui.text.font.FontStyle | ||
import androidx.compose.ui.text.font.FontWeight | ||
import androidx.compose.ui.unit.sp | ||
import com.nexters.ilab.android.core.designsystem.R | ||
|
||
val pretendardFamily = FontFamily( | ||
Font(R.font.pretendard_bold, FontWeight.Bold, FontStyle.Normal), | ||
Font(R.font.pretendard_semi_bold, FontWeight.SemiBold, FontStyle.Normal), | ||
Font(R.font.pretendard_medium, FontWeight.Medium, FontStyle.Normal), | ||
Font(R.font.pretendard_regular, FontWeight.Normal, FontStyle.Normal), | ||
) | ||
|
||
val Title1 = TextStyle( | ||
fontFamily = pretendardFamily, | ||
fontWeight = FontWeight.Bold, | ||
fontSize = 28.sp, | ||
lineHeight = 39.sp, | ||
) | ||
|
||
val Title2 = TextStyle( | ||
fontFamily = pretendardFamily, | ||
fontWeight = FontWeight.SemiBold, | ||
fontSize = 20.sp, | ||
lineHeight = 28.sp, | ||
) | ||
|
||
val Subtitle1 = TextStyle( | ||
fontFamily = pretendardFamily, | ||
fontWeight = FontWeight.SemiBold, | ||
fontSize = 18.sp, | ||
lineHeight = 25.sp, | ||
) | ||
|
||
val Subtitle2 = TextStyle( | ||
fontFamily = pretendardFamily, | ||
fontWeight = FontWeight.SemiBold, | ||
fontSize = 16.sp, | ||
lineHeight = 22.sp, | ||
) | ||
|
||
val Contents1 = TextStyle( | ||
fontFamily = pretendardFamily, | ||
fontWeight = FontWeight.Medium, | ||
fontSize = 16.sp, | ||
lineHeight = 24.sp, | ||
) | ||
|
||
val Contents2 = TextStyle( | ||
fontFamily = pretendardFamily, | ||
fontWeight = FontWeight.Normal, | ||
fontSize = 14.sp, | ||
lineHeight = 22.sp, | ||
) | ||
|
||
val Contents3 = TextStyle( | ||
fontFamily = pretendardFamily, | ||
fontWeight = FontWeight.Normal, | ||
fontSize = 12.sp, | ||
lineHeight = 18.sp, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="11dp" | ||
android:height="19dp" | ||
android:viewportWidth="11" | ||
android:viewportHeight="19"> | ||
<group> | ||
<clip-path | ||
android:pathData="M0,0h10.5v18.5h-10.5z"/> | ||
<path | ||
android:pathData="M9.55,17.75L0.75,9.26L9.75,0.75" | ||
android:strokeLineJoin="round" | ||
android:strokeWidth="1.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#121212"/> | ||
</group> | ||
</vector> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<group> | ||
<clip-path | ||
android:pathData="M0,0h24v24h-24z"/> | ||
<path | ||
android:pathData="M4.29,4.29C6.56,6.68 19.71,19.71 19.71,19.71" | ||
android:strokeWidth="1.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#121212" | ||
android:strokeLineCap="round"/> | ||
<path | ||
android:pathData="M19.71,4.29C17.33,6.57 4.29,19.71 4.29,19.71" | ||
android:strokeWidth="1.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#121212" | ||
android:strokeLineCap="round"/> | ||
</group> | ||
</vector> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
core/designsystem/src/main/res/drawable/ic_guide_error.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="20dp" | ||
android:height="20dp" | ||
android:viewportWidth="20" | ||
android:viewportHeight="20"> | ||
<path | ||
android:pathData="M10,10m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" | ||
android:fillColor="#FF584E"/> | ||
<path | ||
android:pathData="M6.364,6.363C7.434,7.491 13.636,13.636 13.636,13.636" | ||
android:strokeWidth="1.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#ffffff" | ||
android:strokeLineCap="round"/> | ||
<path | ||
android:pathData="M13.636,6.363C12.514,7.439 6.364,13.636 6.364,13.636" | ||
android:strokeWidth="1.5" | ||
android:fillColor="#00000000" | ||
android:strokeColor="#ffffff" | ||
android:strokeLineCap="round"/> | ||
</vector> |
14 changes: 14 additions & 0 deletions
14
core/designsystem/src/main/res/drawable/ic_guide_right.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="20dp" | ||
android:height="20dp" | ||
android:viewportWidth="20" | ||
android:viewportHeight="20"> | ||
<path | ||
android:fillColor="#4FCF6B" | ||
android:pathData="M10,10m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" /> | ||
<path | ||
android:fillColor="#00000000" | ||
android:pathData="M10,10m-4.855,0a4.855,4.855 0,1 1,9.709 0a4.855,4.855 0,1 1,-9.709 0" | ||
android:strokeWidth="1.2" | ||
android:strokeColor="#ffffff" /> | ||
</vector> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
core/ui/src/main/kotlin/com/nexters/ilab/core/ui/component/Button.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
package com.nexters.ilab.core.ui.component | ||
|
||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.RowScope | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.sizeIn | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.filled.Check | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.unit.dp | ||
import com.nexters.ilab.android.core.designsystem.theme.Gray300 | ||
import com.nexters.ilab.android.core.designsystem.theme.PurpleBlue600 | ||
import com.nexters.ilab.core.ui.ComponentPreview | ||
|
||
// leadingIcon for login button | ||
@Composable | ||
fun ILabButton( | ||
onClick: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
enabled: Boolean = true, | ||
containerColor: Color = PurpleBlue600, | ||
contentColor: Color = Color.White, | ||
disabledContainerColor: Color = Gray300, | ||
disabledContentColor: Color = Color.White, | ||
text: @Composable () -> Unit, | ||
leadingIcon: @Composable (() -> Unit)? = null, | ||
) { | ||
ILabButton( | ||
onClick = onClick, | ||
modifier = modifier, | ||
enabled = enabled, | ||
containerColor = containerColor, | ||
contentColor = contentColor, | ||
disabledContainerColor = disabledContainerColor, | ||
disabledContentColor = disabledContentColor, | ||
contentPadding = if (leadingIcon != null) { | ||
ButtonDefaults.ButtonWithIconContentPadding | ||
} else { | ||
ButtonDefaults.ContentPadding | ||
}, | ||
) { | ||
ILabButtonContent( | ||
text = text, | ||
leadingIcon = leadingIcon, | ||
) | ||
} | ||
} | ||
|
||
@Composable | ||
fun ILabButton( | ||
onClick: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
enabled: Boolean = true, | ||
containerColor: Color = PurpleBlue600, | ||
contentColor: Color = Color.White, | ||
disabledContainerColor: Color = Gray300, | ||
disabledContentColor: Color = Color.White, | ||
contentPadding: PaddingValues = ButtonDefaults.ContentPadding, | ||
content: @Composable RowScope.() -> Unit, | ||
) { | ||
Button( | ||
onClick = onClick, | ||
modifier = modifier, | ||
enabled = enabled, | ||
shape = RoundedCornerShape(12.dp), | ||
colors = ButtonDefaults.buttonColors( | ||
containerColor = containerColor, | ||
contentColor = contentColor, | ||
disabledContainerColor = disabledContainerColor, | ||
disabledContentColor = disabledContentColor, | ||
), | ||
contentPadding = contentPadding, | ||
content = content, | ||
) | ||
} | ||
|
||
@Composable | ||
private fun ILabButtonContent( | ||
text: @Composable () -> Unit, | ||
leadingIcon: @Composable (() -> Unit)? = null, | ||
) { | ||
if (leadingIcon != null) { | ||
Box(Modifier.sizeIn(maxHeight = ButtonDefaults.IconSize)) { | ||
leadingIcon() | ||
} | ||
} | ||
Box( | ||
Modifier.padding( | ||
start = if (leadingIcon != null) { | ||
ButtonDefaults.IconSpacing | ||
} else { | ||
0.dp | ||
}, | ||
), | ||
) { | ||
text() | ||
} | ||
} | ||
|
||
@ComponentPreview | ||
@Composable | ||
fun ILabButtonPreview() { | ||
ILabButton( | ||
onClick = {}, | ||
text = { | ||
Text("Button") | ||
}, | ||
) | ||
} | ||
|
||
@ComponentPreview | ||
@Composable | ||
fun ILabButtonWithLeadingIconPreview() { | ||
ILabButton( | ||
onClick = {}, | ||
text = { | ||
Text("Button") | ||
}, | ||
leadingIcon = { | ||
Icon( | ||
imageVector = Icons.Filled.Check, | ||
contentDescription = "Navigation icon", | ||
tint = Color.White, | ||
) | ||
}, | ||
) | ||
} |
Oops, something went wrong.