Skip to content

Commit 1043730

Browse files
committed
[ui]: Splash 화면 제작(#37)
1 parent 3796bc7 commit 1043730

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package com.texthip.thip.ui.signin
2+
3+
import androidx.compose.foundation.background
4+
import androidx.compose.foundation.layout.Arrangement
5+
import androidx.compose.foundation.layout.Column
6+
import androidx.compose.foundation.layout.Spacer
7+
import androidx.compose.foundation.layout.fillMaxSize
8+
import androidx.compose.foundation.layout.height
9+
import androidx.compose.material3.Icon
10+
import androidx.compose.material3.Text
11+
import androidx.compose.runtime.Composable
12+
import androidx.compose.ui.Alignment
13+
import androidx.compose.ui.Modifier
14+
import androidx.compose.ui.graphics.Color.Companion.Unspecified
15+
import androidx.compose.ui.res.painterResource
16+
import androidx.compose.ui.res.stringResource
17+
import androidx.compose.ui.text.SpanStyle
18+
import androidx.compose.ui.text.buildAnnotatedString
19+
import androidx.compose.ui.text.withStyle
20+
import androidx.compose.ui.tooling.preview.Preview
21+
import androidx.compose.ui.unit.dp
22+
import com.texthip.thip.R
23+
import com.texthip.thip.ui.theme.Purple
24+
import com.texthip.thip.ui.theme.ThipTheme.colors
25+
import com.texthip.thip.ui.theme.ThipTheme.typography
26+
27+
@Composable
28+
fun SplashScreen() {
29+
Column(
30+
Modifier
31+
.background(colors.Black)
32+
.fillMaxSize(),
33+
horizontalAlignment = Alignment.CenterHorizontally,
34+
verticalArrangement = Arrangement.Center
35+
) {
36+
Icon(
37+
painter = painterResource(R.drawable.ic_logo),
38+
contentDescription = null,
39+
tint = Unspecified,
40+
)
41+
Spacer(modifier = Modifier.height(24.dp))
42+
Text(
43+
text = buildAnnotatedString {
44+
withStyle(style = SpanStyle(color = Purple)) {
45+
append(stringResource(R.string.thip))
46+
}
47+
append(stringResource(R.string.splash_ment))
48+
},
49+
style = typography.smalltitle_sb600_s18_h24,
50+
color = colors.White
51+
)
52+
}
53+
}
54+
55+
@Preview
56+
@Composable
57+
private fun SplashScreenPrev() {
58+
SplashScreen()
59+
}

0 commit comments

Comments
 (0)