Skip to content

Commit 3b9cc8e

Browse files
committed
[design] #62 upload ui
1 parent d792698 commit 3b9cc8e

File tree

3 files changed

+58
-19
lines changed

3 files changed

+58
-19
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import androidx.compose.foundation.interaction.collectIsFocusedAsState
77
import androidx.compose.foundation.layout.Arrangement
88
import androidx.compose.foundation.layout.Box
99
import androidx.compose.foundation.layout.Column
10+
import androidx.compose.foundation.layout.fillMaxHeight
1011
import androidx.compose.foundation.layout.fillMaxWidth
1112
import androidx.compose.foundation.layout.height
1213
import androidx.compose.foundation.layout.heightIn
@@ -79,7 +80,7 @@ fun RecordyBasicTextField(
7980
}
8081

8182
BasicTextField(
82-
modifier =if (minHeight==null) modifier.fillMaxWidth() else modifier.height(148.dp).fillMaxWidth(),
83+
modifier =modifier.fillMaxWidth(),
8384
value = value,
8485
onValueChange = { newValue ->
8586
if (newValue.replace(" ", "").length <= maxLength) onValueChange(newValue)
@@ -101,6 +102,7 @@ fun RecordyBasicTextField(
101102
) {
102103
Box(
103104
modifier = Modifier
105+
.heightIn(minHeight)
104106
.fillMaxWidth()
105107
.clip(shape = shape)
106108
.background(color = Gray08)
@@ -110,7 +112,6 @@ fun RecordyBasicTextField(
110112
shape = shape,
111113
)
112114
.padding(vertical = 16.dp, horizontal = 18.dp),
113-
contentAlignment = Alignment.CenterStart,
114115
) {
115116
if (value.isEmpty()) {
116117
Text(
@@ -184,6 +185,7 @@ fun TextFieldPreview() {
184185
placeholder = "레코디",
185186
maxLines = 20,
186187
maxLength = 300,
188+
minHeight = 148.dp,
187189
value = normalValue,
188190
onValueChange = { normalValue = it },
189191
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="16dp"
3+
android:height="16dp"
4+
android:viewportWidth="16"
5+
android:viewportHeight="16">
6+
<path
7+
android:strokeWidth="1"
8+
android:pathData="M3.75,7.816H12.25"
9+
android:fillColor="#00000000"
10+
android:strokeColor="#A5A9B4"
11+
android:strokeLineCap="round"/>
12+
<path
13+
android:strokeWidth="1"
14+
android:pathData="M8.185,12.25L8.185,3.75"
15+
android:fillColor="#00000000"
16+
android:strokeColor="#A5A9B4"
17+
android:strokeLineCap="round"/>
18+
</vector>

feature/upload/src/main/java/com/record/upload/VideoPickerScreen.kt

+36-17
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ import androidx.compose.ui.Alignment
2323
import androidx.compose.ui.Modifier
2424
import androidx.compose.ui.res.painterResource
2525
import androidx.compose.ui.text.style.TextAlign
26+
import androidx.compose.ui.tooling.preview.Preview
2627
import androidx.compose.ui.unit.dp
2728
import com.record.designsystem.R
29+
import com.record.designsystem.component.button.RecordyButton
2830
import com.record.designsystem.component.navbar.TopNavigationBar
2931
import com.record.designsystem.component.textfield.RecordyBasicTextField
3032
import com.record.designsystem.theme.Background
3133
import com.record.designsystem.theme.RecordyTheme
3234
import com.record.ui.extension.customClickable
35+
import timber.log.Timber
3336

3437
@Composable
3538
fun VideoPickerRoute(
@@ -64,7 +67,7 @@ fun VideoPickerScreen(
6467
) {
6568
TopNavigationBar(title = "영상 선택", enableGradation = true)
6669
Text(
67-
text = "최대 1분의 1080p 영상을 올려주세요.",
70+
text = "주제와 무관한 기록은 무통보로 삭제될 수 있습니다",
6871
color = RecordyTheme.colors.gray03,
6972
style = RecordyTheme.typography.caption2,
7073
maxLines = 1,
@@ -95,7 +98,7 @@ fun VideoPickerScreen(
9598
modifier = Modifier.padding(bottom = 12.dp)
9699
)
97100
Text(
98-
text = "영상 선택",
101+
text = "내용 작성",
99102
color = RecordyTheme.colors.white,
100103
style = RecordyTheme.typography.subtitle,
101104
)
@@ -107,23 +110,23 @@ fun VideoPickerScreen(
107110
style = RecordyTheme.typography.subtitle,
108111
modifier = Modifier.padding(top = 22.dp, bottom = 12.dp)
109112
)
110-
111-
Row(
112-
modifier = Modifier
113+
Row(modifier = Modifier
113114
.background(RecordyTheme.colors.gray08, shape = RoundedCornerShape(30.dp))
115+
.padding(vertical = 8.dp)
116+
.padding(start = 8.dp, end = 12.dp)
114117
.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-
)
118+
verticalAlignment = Alignment.CenterVertically,
119+
horizontalArrangement = Arrangement.Center
120+
) {
121+
Image(
122+
painter = painterResource(id = R.drawable.ic_plus_16),
123+
contentDescription = null,
124+
)
125+
Text(
126+
text = "키워드",
127+
color = RecordyTheme.colors.gray03,
128+
style = RecordyTheme.typography.body2M,
129+
)
127130
}
128131
Text(
129132
text = "위치",
@@ -148,9 +151,25 @@ fun VideoPickerScreen(
148151
placeholder = "공간에 대한 나의 생각을 자유롭게 적어주세요!",
149152
maxLines = 20,
150153
maxLength = 300,
154+
minHeight = 148.dp,
151155
value = normalValue,
156+
modifier = Modifier.padding(bottom = 10.dp),
152157
onValueChange = { normalValue = it },
153158
)
159+
RecordyButton(
160+
// modifier = Modifier.padding(16.dp),
161+
text = "키워드",
162+
enabled = false,
163+
onClick = { Timber.d("basic key word") },
164+
)
154165
}
155166
}
156167
}
168+
169+
@Preview
170+
@Composable
171+
fun VideoPickerScreenPreview() {
172+
RecordyTheme {
173+
VideoPickerScreen(navigateSelectedKeyword = { /*TODO*/ })
174+
}
175+
}

0 commit comments

Comments
 (0)