generated from AND-SOPT-ANDROID/and-sopt-android-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
894 additions
and
467 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
app/src/main/java/org/sopt/and/presentation/myinfo/MyInfoScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
178
app/src/main/java/org/sopt/and/presentation/myinfo/MyScreen.kt
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
...src/main/java/org/sopt/and/presentation/myinfo/components/MyInfoPaymenIntroducementBox.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
app/src/main/java/org/sopt/and/presentation/myinfo/components/MyInfoProfile.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) | ||
} | ||
} |
Oops, something went wrong.