Skip to content

Commit

Permalink
[fix] #9 - SignUp / SignIn 구조 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
sayyyho committed Dec 8, 2024
1 parent 35afaca commit bb69bad
Show file tree
Hide file tree
Showing 19 changed files with 894 additions and 467 deletions.
82 changes: 82 additions & 0 deletions app/src/main/java/org/sopt/and/presentation/myinfo/MyInfoScreen.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
package org.sopt.and.presentation.myinfo

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import org.sopt.and.R
import org.sopt.and.presentation.components.EmptyInfoBox
import org.sopt.and.presentation.myinfo.components.MyInfoPaymentInducementBox
import org.sopt.and.presentation.myinfo.components.MyInfoProfile
import org.sopt.and.ui.theme.ANDANDROIDTheme
import org.sopt.and.ui.theme.Black100

@Composable
fun MyInfoScreen(
paddingValues: PaddingValues,
myHobby: String,
getMyHobby: () -> Unit,
modifier: Modifier = Modifier
) {
Column(
modifier = modifier
.fillMaxSize()
.background(color = Black100)
.padding(paddingValues)
) {
MyInfoProfile(
myHobby = myHobby,
getMyHobby = getMyHobby,
modifier = Modifier.weight(0.16f)
)

MyInfoPaymentInducementBox(
paymentInducementText = stringResource(id = R.string.my_first_payment_text),
modifier = Modifier.weight(0.12f)
)

Spacer(modifier = Modifier.height(2.dp))

MyInfoPaymentInducementBox(
paymentInducementText = stringResource(id = R.string.my_no_ticket_text),
modifier = Modifier.weight(0.12f)
)

EmptyInfoBox(
title = stringResource(R.string.my_viewing_history_box_title),
description = stringResource(R.string.my_viewing_history_box_empty_text),
modifier = Modifier.weight(0.3f)
)

EmptyInfoBox(
title = stringResource(R.string.my_program_of_interest_box_title),
description = stringResource(R.string.my_program_of_interest_empty_text),
modifier = Modifier.weight(0.3f)
)
}
}

@Preview(
showBackground = true
)
@Composable
fun MyScreenPreview() {
ANDANDROIDTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
MyInfoScreen(
paddingValues = innerPadding,
myHobby = "...Loading",
getMyHobby = {}
)
}
}
}
178 changes: 0 additions & 178 deletions app/src/main/java/org/sopt/and/presentation/myinfo/MyScreen.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package org.sopt.and.presentation.myinfo.components

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import org.sopt.and.R
import org.sopt.and.ui.theme.Grey100
import org.sopt.and.ui.theme.Grey200
import org.sopt.and.ui.theme.White100


@Composable
fun MyInfoPaymentInducementBox(
paymentInducementText: String,
modifier: Modifier = Modifier
) {
Column(
modifier = modifier
.fillMaxWidth()
.background(color = Grey100)
.padding(16.dp)
) {
Text(
text = paymentInducementText,
color = Grey200
)

Spacer(modifier = Modifier.height(4.dp))

Text(
text = stringResource(id = R.string.my_to_payment_button),
color = White100
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package org.sopt.and.presentation.myinfo.components

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.AccountCircle
import androidx.compose.material.icons.outlined.Notifications
import androidx.compose.material.icons.outlined.Settings
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import org.sopt.and.R
import org.sopt.and.ui.theme.Grey100
import org.sopt.and.ui.theme.White100

@Composable
fun MyInfoProfile(
myHobby: String,
getMyHobby: () -> Unit,
modifier: Modifier = Modifier
) {
getMyHobby()

Row(
modifier = modifier
.fillMaxWidth()
.background(color = Grey100)
.padding(16.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
imageVector = Icons.Default.AccountCircle,
contentDescription = stringResource(id = R.string.my_account_icon_description),
modifier = Modifier.size(80.dp),
tint = White100
)

Spacer(modifier = Modifier.width(5.dp))

Text(
text = myHobby.ifEmpty { "Loading..." },
color = White100
)

Spacer(modifier = Modifier.weight(1f))

Icon(
imageVector = Icons.Outlined.Notifications,
contentDescription = stringResource(id = R.string.my_notification_icon_description),
modifier = Modifier.size(30.dp),
tint = White100
)

Spacer(modifier = Modifier.width(24.dp))

Icon(
imageVector = Icons.Outlined.Settings,
contentDescription = stringResource(id = R.string.my_setting_icon_description),
modifier = Modifier.size(30.dp),
tint = White100
)
}
}
Loading

0 comments on commit bb69bad

Please sign in to comment.