-
Notifications
You must be signed in to change notification settings - Fork 1
인증샷 업로드시 로딩 화면 추가 #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
인증샷 업로드시 로딩 화면 추가 #100
Changes from all commits
776ce82
6e42db2
42e1d1c
202ba71
aca38cf
2fc56a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="164dp" | ||
| android:height="134dp" | ||
| android:viewportWidth="164" | ||
| android:viewportHeight="134"> | ||
| <path | ||
| android:pathData="M59.78,88.96C56.92,88.85 54.34,90.38 52.77,92.81C51.4,90.28 48.95,88.54 46.09,88.44C45.8,88.42 45.49,88.44 45.2,88.46C39.59,88.92 36.62,96.52 40.54,101.37L49.6,110.81C50.88,112.15 52.99,112.23 54.39,111L64.25,102.29C68.59,97.74 66.23,89.93 60.67,89.06C60.38,89.02 60.09,88.99 59.81,88.98L59.78,88.96Z" | ||
| android:strokeLineJoin="round" | ||
| android:strokeWidth="2" | ||
| android:fillColor="#FF96AD" | ||
| android:strokeColor="#171717" | ||
| android:strokeLineCap="round"/> | ||
| <path | ||
| android:pathData="M32.65,72.67C30.7,72.72 29.02,73.87 28.06,75.59C27.02,73.94 25.28,72.86 23.34,72.92C23.14,72.92 22.93,72.94 22.73,72.98C18.95,73.53 17.26,78.82 20.14,81.94L26.7,87.94C27.63,88.8 29.06,88.76 29.96,87.87L36.27,81.52C39.01,78.24 37.07,73.04 33.26,72.7C33.06,72.68 32.86,72.68 32.67,72.68L32.65,72.67Z" | ||
| android:strokeLineJoin="round" | ||
| android:strokeWidth="2" | ||
| android:fillColor="#FF96AD" | ||
| android:strokeColor="#171717" | ||
| android:strokeLineCap="round"/> | ||
| <path | ||
| android:pathData="M140.52,26.12L53.23,45.98L79.69,61.67L140.52,26.12Z" | ||
| android:strokeLineJoin="round" | ||
| android:strokeWidth="2" | ||
| android:fillColor="#ffffff" | ||
| android:strokeColor="#171717"/> | ||
| <path | ||
| android:pathData="M79.86,84.62V61.53L140.55,26.1L79.86,84.62Z" | ||
| android:strokeLineJoin="round" | ||
| android:strokeWidth="2" | ||
| android:fillColor="#ECECEC" | ||
| android:strokeColor="#171717"/> | ||
| <path | ||
| android:pathData="M80.01,84.9L89.16,67.76H105.13L80.01,84.9Z" | ||
| android:strokeLineJoin="round" | ||
| android:strokeWidth="2" | ||
| android:fillColor="#C6C6C6" | ||
| android:strokeColor="#171717"/> | ||
| <path | ||
| android:pathData="M97.6,72.9L89.16,67.76L140.54,26.2L115.87,84.02L97.6,72.9Z" | ||
| android:fillColor="#ffffff"/> | ||
| <path | ||
| android:pathData="M89.16,67.76L115.87,84.02M89.16,67.76L140.54,26.2L115.87,84.02M89.16,67.76L97.6,72.9L115.87,84.02" | ||
| android:strokeLineJoin="round" | ||
| android:strokeWidth="2" | ||
| android:fillColor="#00000000" | ||
| android:strokeColor="#171717"/> | ||
| </vector> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| package com.twix.task_certification.certification.component | ||
|
|
||
| import androidx.compose.animation.core.EaseInOut | ||
| import androidx.compose.animation.core.LinearEasing | ||
| import androidx.compose.animation.core.RepeatMode | ||
| import androidx.compose.animation.core.animateFloat | ||
| import androidx.compose.animation.core.infiniteRepeatable | ||
| import androidx.compose.animation.core.rememberInfiniteTransition | ||
| import androidx.compose.animation.core.tween | ||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.Spacer | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.height | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.runtime.getValue | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.graphicsLayer | ||
| 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 com.twix.designsystem.R | ||
| import com.twix.designsystem.components.text.AppText | ||
| import com.twix.designsystem.theme.CommonColor | ||
| import com.twix.designsystem.theme.GrayColor | ||
| import com.twix.designsystem.theme.TwixTheme | ||
| import com.twix.domain.model.enums.AppTextStyle | ||
|
|
||
| @Composable | ||
| internal fun LoadingContent() { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 기기별로 위치가 달라질 수 있을 거 같아서 가운데 정렬로 해도 되지 않을까요?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 좋은 생각인 것 같아 ! 리뷰 반영 커밋 : aca38cf |
||
| Column( | ||
| modifier = | ||
| Modifier | ||
| .fillMaxSize() | ||
| .background(CommonColor.White), | ||
| horizontalAlignment = Alignment.CenterHorizontally, | ||
| verticalArrangement = Arrangement.Center, | ||
| ) { | ||
| FloatingPlane() | ||
|
|
||
| Spacer(Modifier.height(6.dp)) | ||
|
|
||
| AppText( | ||
| text = stringResource(R.string.task_certification_loading), | ||
| style = AppTextStyle.H1, | ||
| color = GrayColor.C500, | ||
| ) | ||
|
|
||
| Spacer(Modifier.height(10.dp)) | ||
|
|
||
| AppText( | ||
| text = stringResource(R.string.task_certification_plz_waiting), | ||
| style = AppTextStyle.T2, | ||
| color = GrayColor.C300, | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Composable | ||
| private fun FloatingPlane() { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 6f, 8f가 반복적으로 사용되니까 변수로 빼는 게 나중에 수정할 때 좋을 거 같아요!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 리뷰 반영 커밋 : 2fc56a3 |
||
| val planeXOffset = 6f | ||
| val planeYOffset = 8f | ||
| val planeRotation = 6f | ||
| val transition = rememberInfiniteTransition(label = "plane") | ||
|
|
||
| val offsetY by transition.animateFloat( | ||
| -planeYOffset, | ||
| planeYOffset, | ||
| infiniteRepeatable( | ||
| tween(1500, easing = EaseInOut), | ||
| RepeatMode.Reverse, | ||
| ), | ||
| ) | ||
|
|
||
| val offsetX by transition.animateFloat( | ||
| -planeXOffset, | ||
| planeXOffset, | ||
| infiniteRepeatable( | ||
| tween(2200, easing = LinearEasing), | ||
| RepeatMode.Reverse, | ||
| ), | ||
| ) | ||
|
|
||
| val rotation by transition.animateFloat( | ||
| -planeRotation, | ||
| planeRotation, | ||
| infiniteRepeatable( | ||
| tween(1300, easing = EaseInOut), | ||
| RepeatMode.Reverse, | ||
| ), | ||
| ) | ||
|
|
||
| Image( | ||
| painter = painterResource(R.drawable.ic_big_plane), | ||
| contentDescription = null, | ||
| modifier = | ||
| Modifier.graphicsLayer { | ||
| translationX = offsetX | ||
| translationY = offsetY | ||
| rotationZ = rotation | ||
| }, | ||
| ) | ||
| } | ||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| private fun LoadingContentPreview() { | ||
| TwixTheme { | ||
| LoadingContent() | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BaseViewModel 보면 onStart, onFinally가 로딩 상태 처리하라고 만든 거라서 혹시 지금 상황에서 사용하지 않은 이유가 따로 있나요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
몰랐슴둥 ... 🙏
리뷰 반영 커밋 : 202ba71