Skip to content

Commit

Permalink
Merge pull request #159 from eoeo0326/feat/compose_theme
Browse files Browse the repository at this point in the history
Compose Theme 통일
  • Loading branch information
eoeo0326 authored May 29, 2023
2 parents 3aa8612 + 0b471ad commit 10e5c6d
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 221 deletions.
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ dependencies {
def lifecycle_version = "2.6.0-alpha03"
def pagingComposeVersion = "1.0.0-alpha19"
def pagingVersion = "3.1.1"
def pagingComposeVersion = "1.0.0-alpha19"
def glide_version = "4.14.2"
def glide_compose_version = "1.0.0-alpha.1"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ import com.boostcamp.dailyfilm.data.model.DailyFilmItem
import com.boostcamp.dailyfilm.presentation.calendar.CalendarActivity
import com.boostcamp.dailyfilm.presentation.calendar.DateFragment
import com.boostcamp.dailyfilm.presentation.playfilm.PlayFilmActivity
import com.boostcamp.dailyfilm.presentation.searchfilm.ui.theme.DailyFilmTheme
import com.boostcamp.dailyfilm.presentation.searchfilm.ui.theme.lightGray
import com.boostcamp.dailyfilm.presentation.ui.theme.DailyFilmTheme
import com.boostcamp.dailyfilm.presentation.ui.theme.lightGray
import com.bumptech.glide.Glide
import com.bumptech.glide.RequestManager
import com.bumptech.glide.integration.compose.ExperimentalGlideComposeApi
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import com.boostcamp.dailyfilm.R
import com.boostcamp.dailyfilm.presentation.login.LoginActivity
import com.boostcamp.dailyfilm.presentation.settings.SettingsEvent
import com.boostcamp.dailyfilm.presentation.settings.SettingsViewModel
import com.boostcamp.dailyfilm.presentation.ui.theme.ComposeApplicationTheme
import com.boostcamp.dailyfilm.presentation.ui.theme.DailyFilmTheme
import com.boostcamp.dailyfilm.presentation.util.dialog.CustomDialog
import com.google.android.gms.auth.api.signin.GoogleSignIn
import com.google.android.gms.auth.api.signin.GoogleSignInOptions
Expand All @@ -54,7 +54,7 @@ class SettingComposeActivity : ComponentActivity() {
super.onCreate(savedInstanceState)

setContent {
ComposeApplicationTheme {
DailyFilmTheme {
SettingUI(viewModel)
}
}
Expand Down Expand Up @@ -92,8 +92,10 @@ fun SettingView(viewModel: SettingsViewModel, activity: Activity) {
},
delete = {
viewModel.openDialog(deleteUserDes) { viewModel.deleteUser() }
})
})
},
)
},
)
}

@Composable
Expand All @@ -102,7 +104,7 @@ fun SettingTopAppBar(activity: Activity) {
title = {
Text(
text = stringResource(R.string.setting_toolbar_title),
color = MaterialTheme.colors.onBackground
color = MaterialTheme.colors.onBackground,
)
},
navigationIcon = {
Expand All @@ -112,19 +114,18 @@ fun SettingTopAppBar(activity: Activity) {
Icon(
imageVector = Icons.Filled.ArrowBack,
contentDescription = "Go Back",
tint = MaterialTheme.colors.onBackground
tint = MaterialTheme.colors.onBackground,
)
}
},
backgroundColor = MaterialTheme.colors.background
backgroundColor = MaterialTheme.colors.background,
)
}

@Composable
fun ContentView(logOut: () -> Unit, delete: () -> Unit) {

Column(
verticalArrangement = Arrangement.spacedBy(4.dp)
verticalArrangement = Arrangement.spacedBy(4.dp),
) {
SettingColumn {
SettingTitleTextView(stringResource(id = R.string.account))
Expand All @@ -142,9 +143,9 @@ fun SettingColumn(content: @Composable ColumnScope.() -> Unit) {
.padding(5.dp)
.border(
border = BorderStroke(1.dp, MaterialTheme.colors.primary),
shape = RoundedCornerShape(8.dp)
shape = RoundedCornerShape(8.dp),
),
content = content
content = content,
)
}

Expand Down Expand Up @@ -177,31 +178,31 @@ fun DialogUI(viewModel: SettingsViewModel) {
text = openDialog.content,
onDismiss = {
viewModel.closeDialog()
}, confirm = openDialog.execution
},
confirm = openDialog.execution,
)
}
}


@Preview(showBackground = true, widthDp = 320, heightDp = 320)
@Composable
fun PreviewSettingView() {
ComposeApplicationTheme {
DailyFilmTheme {
ContentView({}, {})
}
}

@Composable
fun Logout(activity: Activity) {

val context = LocalContext.current

FirebaseAuth.getInstance().signOut()

GoogleSignIn.getClient(
activity, GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
activity,
GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.build()
.build(),
).signOut().addOnCompleteListener {
navigateToLogin(context)
}
Expand All @@ -211,9 +212,9 @@ fun navigateToLogin(context: Context) {
context.startActivity(
Intent(
context,
LoginActivity::class.java
LoginActivity::class.java,
).apply {
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
}
},
)
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
package com.example.composeapplication.ui.theme
package com.boostcamp.dailyfilm.presentation.ui.theme

import androidx.compose.ui.graphics.Color

val primary = Color(0xFF202022)
val onPrimary = Color(0xFFFFFFFF)
val surface = Color(0xFFFFFFFF)
val onSurface = Color(0xFF202022)

val black = Color.Black
val blackBlur = Color(0x4D000000)
val white = Color.White
val lightBlack = Color(0xFF202022)
val lightGray = Color(0xFFE1E1E1)

// nights
val darkPrimary = Color(0xFFFFFFFF)
val darkOnPrimary = Color(0xFFFFFFFF)
val darkSurface = Color(0xFF202022)
val darkOnSurface = Color(0xFFFFFFFF)
val primary = lightBlack
val primaryVariant = white
val background = white
val surface = white
val error = Color(0xFFB00020)
val onPrimary = black
val onBackground = black
val onSurface = black
val onError = white

val white = Color(0xFFFFFFFF)
val lightBlack = Color(0xFF202022)
val black = Color(0xFF000000)
// darkTheme
val darkPrimary = white
val darkPrimaryVariant = lightBlack
val darkBackground = lightBlack
val darkSurface = Color(0xFF121212)
val darkError = Color(0xFFCF6679)
val darkOnPrimary = white
val darkOnBackground = white
val darkOnSurface = white
val darkOnError = black

This file was deleted.

Loading

0 comments on commit 10e5c6d

Please sign in to comment.