Skip to content

Commit d792698

Browse files
committed
[design] #62 upload ui
1 parent 0964af7 commit d792698

File tree

3 files changed

+122
-15
lines changed

3 files changed

+122
-15
lines changed

core/designsystem/src/main/java/com/record/designsystem/component/textfield/RecordyBasicTextField.kt

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.Arrangement
88
import androidx.compose.foundation.layout.Box
99
import androidx.compose.foundation.layout.Column
1010
import androidx.compose.foundation.layout.fillMaxWidth
11+
import androidx.compose.foundation.layout.height
1112
import androidx.compose.foundation.layout.heightIn
1213
import androidx.compose.foundation.layout.padding
1314
import androidx.compose.foundation.shape.RoundedCornerShape
@@ -30,7 +31,9 @@ import androidx.compose.ui.text.TextStyle
3031
import androidx.compose.ui.text.input.VisualTransformation
3132
import androidx.compose.ui.text.style.TextOverflow
3233
import androidx.compose.ui.tooling.preview.Preview
34+
import androidx.compose.ui.unit.Dp
3335
import androidx.compose.ui.unit.dp
36+
import androidx.compose.ui.unit.min
3437
import com.record.designsystem.theme.Alert
3538
import com.record.designsystem.theme.Black
3639
import com.record.designsystem.theme.Gray01
@@ -54,6 +57,7 @@ fun RecordyBasicTextField(
5457
maxLines: Int = 1,
5558
minLines: Int = 1,
5659
maxLength: Int = 10,
60+
minHeight: Dp = 52.dp,
5761
textStyle: TextStyle = RecordyTheme.typography.body2M,
5862
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
5963
keyboardActions: KeyboardActions = KeyboardActions.Default,
@@ -75,7 +79,7 @@ fun RecordyBasicTextField(
7579
}
7680

7781
BasicTextField(
78-
modifier = modifier.fillMaxWidth(),
82+
modifier =if (minHeight==null) modifier.fillMaxWidth() else modifier.height(148.dp).fillMaxWidth(),
7983
value = value,
8084
onValueChange = { newValue ->
8185
if (newValue.replace(" ", "").length <= maxLength) onValueChange(newValue)
@@ -92,10 +96,7 @@ fun RecordyBasicTextField(
9296
decorationBox = { innerText ->
9397
Column(
9498
modifier = Modifier
95-
.fillMaxWidth()
96-
.heightIn(
97-
min = 52.dp,
98-
),
99+
.fillMaxWidth(),
99100
verticalArrangement = Arrangement.SpaceBetween,
100101
) {
101102
Box(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="25dp"
3+
android:height="25dp"
4+
android:viewportWidth="25"
5+
android:viewportHeight="25">
6+
<path
7+
android:pathData="M14.698,1.976C14.698,0.885 13.814,0 12.722,0C11.631,0 10.747,0.885 10.747,1.976V9.722H2.812C1.738,9.722 0.867,10.593 0.867,11.667C0.867,12.741 1.738,13.611 2.812,13.611H10.747V22.33C10.747,23.421 11.631,24.306 12.722,24.306C13.814,24.306 14.698,23.421 14.698,22.33V13.611H22.633C23.707,13.611 24.577,12.741 24.577,11.667C24.577,10.593 23.707,9.722 22.633,9.722H14.698V1.976Z"
8+
android:fillColor="#A5A9B4"
9+
android:fillType="evenOdd"/>
10+
</vector>
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
11
package com.record.upload
22

3+
import androidx.compose.foundation.Image
34
import androidx.compose.foundation.background
5+
import androidx.compose.foundation.layout.Arrangement
46
import androidx.compose.foundation.layout.Box
57
import androidx.compose.foundation.layout.Column
68
import androidx.compose.foundation.layout.PaddingValues
9+
import androidx.compose.foundation.layout.Row
710
import androidx.compose.foundation.layout.fillMaxSize
811
import androidx.compose.foundation.layout.fillMaxWidth
12+
import androidx.compose.foundation.layout.padding
13+
import androidx.compose.foundation.rememberScrollState
14+
import androidx.compose.foundation.shape.RoundedCornerShape
15+
import androidx.compose.foundation.verticalScroll
916
import androidx.compose.material3.Text
1017
import androidx.compose.runtime.Composable
18+
import androidx.compose.runtime.getValue
19+
import androidx.compose.runtime.mutableStateOf
20+
import androidx.compose.runtime.remember
21+
import androidx.compose.runtime.setValue
1122
import androidx.compose.ui.Alignment
1223
import androidx.compose.ui.Modifier
24+
import androidx.compose.ui.res.painterResource
1325
import androidx.compose.ui.text.style.TextAlign
14-
import com.record.designsystem.component.button.RecordyButton
26+
import androidx.compose.ui.unit.dp
27+
import com.record.designsystem.R
1528
import com.record.designsystem.component.navbar.TopNavigationBar
29+
import com.record.designsystem.component.textfield.RecordyBasicTextField
1630
import com.record.designsystem.theme.Background
17-
import com.record.designsystem.theme.Gray03
1831
import com.record.designsystem.theme.RecordyTheme
32+
import com.record.ui.extension.customClickable
1933

2034
@Composable
2135
fun VideoPickerRoute(
@@ -24,37 +38,119 @@ fun VideoPickerRoute(
2438
) {
2539
VideoPickerScreen(
2640
navigateSelectedKeyword = navigateSelectedKeyword,
41+
onClickPickVideo = {},
42+
onClickKeyword = {}
2743
)
2844
}
2945

3046
@Composable
3147
fun VideoPickerScreen(
3248
navigateSelectedKeyword: () -> Unit,
49+
onClickPickVideo: () -> Unit = {},
50+
onClickKeyword: () -> Unit = {},
3351
) {
52+
var normalValue by remember {
53+
mutableStateOf("")
54+
}
3455
Box(
3556
modifier = Modifier
3657
.fillMaxSize()
3758
.background(Background),
3859
) {
3960
Column(
4061
modifier = Modifier
41-
.align(Alignment.TopCenter),
62+
.align(Alignment.TopCenter)
63+
.verticalScroll(rememberScrollState()),
4264
) {
4365
TopNavigationBar(title = "영상 선택", enableGradation = true)
4466
Text(
4567
text = "ⓘ 최대 1분의 1080p 영상을 올려주세요.",
46-
color = Gray03,
68+
color = RecordyTheme.colors.gray03,
4769
style = RecordyTheme.typography.caption2,
4870
maxLines = 1,
4971
modifier = Modifier.fillMaxWidth(),
5072
textAlign = TextAlign.Center,
5173
)
74+
Text(
75+
text = "영상",
76+
color = RecordyTheme.colors.white,
77+
style = RecordyTheme.typography.subtitle,
78+
modifier = Modifier.padding(top = 20.dp, bottom = 9.dp)
79+
)
80+
Box(
81+
modifier = Modifier
82+
.background(RecordyTheme.colors.gray08, shape = RoundedCornerShape(16.dp))
83+
.customClickable(onClick = onClickPickVideo),
84+
) {
85+
Column(
86+
modifier = Modifier
87+
.align(Alignment.Center)
88+
.padding(vertical = 115.dp, horizontal = 57.dp),
89+
verticalArrangement = Arrangement.Center,
90+
horizontalAlignment = Alignment.CenterHorizontally
91+
) {
92+
Image(
93+
painter = painterResource(id = R.drawable.ic_plus_25),
94+
contentDescription = null,
95+
modifier = Modifier.padding(bottom = 12.dp)
96+
)
97+
Text(
98+
text = "영상 선택",
99+
color = RecordyTheme.colors.white,
100+
style = RecordyTheme.typography.subtitle,
101+
)
102+
}
103+
}
104+
Text(
105+
text = "키워드",
106+
color = RecordyTheme.colors.white,
107+
style = RecordyTheme.typography.subtitle,
108+
modifier = Modifier.padding(top = 22.dp, bottom = 12.dp)
109+
)
110+
111+
Row(
112+
modifier = Modifier
113+
.background(RecordyTheme.colors.gray08, shape = RoundedCornerShape(30.dp))
114+
.customClickable(onClick = onClickKeyword),
115+
verticalAlignment = Alignment.CenterVertically,
116+
horizontalArrangement = Arrangement.Center
117+
) {
118+
Image(
119+
painter = painterResource(id = R.drawable.ic_plus_25),
120+
contentDescription = null,
121+
)
122+
Text(
123+
text = "키워드",
124+
color = RecordyTheme.colors.gray03,
125+
style = RecordyTheme.typography.body2M,
126+
)
127+
}
128+
Text(
129+
text = "위치",
130+
color = RecordyTheme.colors.white,
131+
style = RecordyTheme.typography.subtitle,
132+
modifier = Modifier.padding(top = 20.dp, bottom = 12.dp)
133+
)
134+
RecordyBasicTextField(
135+
placeholder = "영상 속 위치는 어디인가요?",
136+
maxLines = 1,
137+
maxLength = 10,
138+
value = normalValue,
139+
onValueChange = { normalValue = it },
140+
)
141+
Text(
142+
text = "내용",
143+
color = RecordyTheme.colors.white,
144+
style = RecordyTheme.typography.subtitle,
145+
modifier = Modifier.padding(top = 10.dp, bottom = 12.dp)
146+
)
147+
RecordyBasicTextField(
148+
placeholder = "공간에 대한 나의 생각을 자유롭게 적어주세요!",
149+
maxLines = 20,
150+
maxLength = 300,
151+
value = normalValue,
152+
onValueChange = { normalValue = it },
153+
)
52154
}
53-
RecordyButton(
54-
modifier = Modifier.align(Alignment.Center),
55-
text = "다음",
56-
enabled = true,
57-
onClick = navigateSelectedKeyword,
58-
)
59155
}
60156
}

0 commit comments

Comments
 (0)