Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ android {
defaultConfig {
applicationId = "com.wafflestudio.siksha2"
minSdk = 31
targetSdk = 34
targetSdk = 35
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />

<queries>
<package android:name="com.google.android.apps.maps" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.util.AttributeSet
import android.view.*
import android.widget.LinearLayout
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.wafflestudio.siksha2.R
Expand Down Expand Up @@ -208,18 +207,15 @@ class CalendarSelectView : LinearLayout {
) {
setBackgroundResource(R.drawable.frame_day_select)
setTextColor(ContextCompat.getColor(context, R.color.white))
typeface = ResourcesCompat.getFont(context, R.font.nanum_square_bold)
} else if (today.year == year &&
today.monthValue == month &&
today.dayOfMonth == data
) {
setBackgroundResource(R.drawable.frame_day_today)
setTextColor(ContextCompat.getColor(context, R.color.gray_700))
typeface = ResourcesCompat.getFont(context, R.font.nanum_square_regular)
} else {
setBackgroundColor(ContextCompat.getColor(context, R.color.transparent))
setTextColor(ContextCompat.getColor(context, R.color.gray_700))
typeface = ResourcesCompat.getFont(context, R.font.nanum_square_regular)
}
setOnClickListener {
updateDate(LocalDate.of(year, month, data))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import android.util.AttributeSet
import android.view.Gravity
import android.view.LayoutInflater
import android.widget.LinearLayout
import androidx.core.content.ContextCompat
import androidx.compose.ui.graphics.Color
import com.wafflestudio.siksha2.R
import com.wafflestudio.siksha2.databinding.ItemSettingRowBinding
import com.wafflestudio.siksha2.utils.dp
import com.wafflestudio.siksha2.utils.setVisibleOrGone

class SettingItemRow : LinearLayout {
Expand Down Expand Up @@ -57,6 +58,9 @@ class SettingItemRow : LinearLayout {
private fun init(attr: AttributeSet?) {
gravity = Gravity.CENTER_VERTICAL
orientation = HORIZONTAL
val dp18 = context.dp(18)
val dp24 = context.dp(24)
setPadding(dp24, dp18, dp24, dp18)

context.theme.obtainStyledAttributes(
attr,
Expand All @@ -69,7 +73,9 @@ class SettingItemRow : LinearLayout {
setNewIcon(getBoolean(R.styleable.SettingItem_showNewIcon, false))
setShowCheckbox(getBoolean(R.styleable.SettingItem_showCheckbox, false))
binding.settingRowText.text = getString(R.styleable.SettingItem_itemText)
binding.settingRowText.setTextColor(context.obtainStyledAttributes(attr, R.styleable.SettingItem).getColor(R.styleable.SettingItem_textColor, ContextCompat.getColor(context, R.color.black)))

val textColor = getColor(R.styleable.SettingItem_textColor, Color.DarkGray.hashCode())
binding.settingRowText.setTextColor(textColor)
} finally {
recycle()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SikshaColors
import com.wafflestudio.siksha2.ui.SikshaTypography

@Composable
Expand All @@ -29,17 +28,16 @@ fun Chip(
text = text,
modifier = modifier
.clip(RoundedCornerShape(12.dp))
.background(if (selected) SikshaTheme.colors.Orange500 else SikshaTheme.colors.Gray100)
.background(if (selected) SikshaColors.OrangeMain else SikshaColors.Gray100)
.padding(horizontal = 12.dp, vertical = 9.dp)
.clickable(
indication = null,
interactionSource = remember { MutableInteractionSource() }
) {
onClick()
},
color = if (selected) SikshaTheme.colors.TextButton else SikshaTheme.colors.Gray600,
style = SikshaTypography.body1,
fontWeight = FontWeight.Bold
color = if (selected) SikshaColors.White900 else SikshaColors.Gray400,
style = SikshaTypography.body1
)
}

Expand All @@ -48,7 +46,7 @@ fun Chip(
fun ChipPreview() {
Row(
modifier = Modifier
.background(SikshaTheme.colors.White)
.background(SikshaColors.White900)
.padding(20.dp),
horizontalArrangement = Arrangement.spacedBy(10.dp)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.wafflestudio.siksha2.ui.CommentIcon
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SikshaColors
import com.wafflestudio.siksha2.ui.SikshaTypography

// TODO: 더 좋은 이름 찾기
Expand All @@ -27,7 +27,7 @@ fun CommentIconWithCount(
Text(
text = commentCount.toString(),
fontSize = 10.sp,
color = SikshaTheme.colors.Gray700,
color = SikshaColors.Gray600,
style = SikshaTypography.body2
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SikshaColors
import com.wafflestudio.siksha2.ui.SikshaTypography
import com.wafflestudio.siksha2.ui.ThumbIcon

Expand All @@ -28,7 +28,7 @@ fun LikeIconWithCount(
Text(
text = likeCount.toString(),
fontSize = 10.sp,
color = SikshaTheme.colors.Orange500,
color = SikshaColors.OrangeMain,
style = SikshaTypography.body2
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import coil.compose.SubcomposeAsyncImage
import com.wafflestudio.siksha2.ui.SikshaColors
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SikshaTypography

Expand All @@ -34,7 +35,6 @@ fun PostListItem(
) {
Row(
modifier = modifier
.background(SikshaTheme.colors.BackgroundPrimary)
.clickable {
onClick()
}
Expand All @@ -50,15 +50,13 @@ fun PostListItem(
fontWeight = FontWeight.Bold,
style = SikshaTypography.body2,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
color = SikshaTheme.colors.Black
overflow = TextOverflow.Ellipsis
)
Text(
text = content,
style = SikshaTypography.body2,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
color = SikshaTheme.colors.Gray900
overflow = TextOverflow.Ellipsis
)
Row(
horizontalArrangement = Arrangement.spacedBy(10.dp)
Expand All @@ -80,7 +78,7 @@ fun PostListItem(
.size(61.dp),
contentDescription = "",
loading = {
Box(modifier = Modifier.background(SikshaTheme.colors.Gray400))
Box(modifier = Modifier.background(SikshaColors.Gray350))
},
contentScale = ContentScale.Crop
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
Expand All @@ -13,6 +14,7 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.wafflestudio.siksha2.ui.NavigateUpIcon
import com.wafflestudio.siksha2.ui.SikshaColors
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SikshaTypography

Expand All @@ -26,12 +28,12 @@ fun TopBar(
modifier = modifier
.height(56.dp)
.fillMaxWidth()
.background(SikshaTheme.colors.BackgroundGNB)
.background(MaterialTheme.colors.primary)
) {
Text(
text = title,
modifier = Modifier.align(Alignment.Center),
color = SikshaTheme.colors.TextGNB,
color = SikshaColors.White900,
fontWeight = FontWeight.ExtraBold,
style = SikshaTypography.subtitle1
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.wafflestudio.siksha2.R
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SikshaColors
import kotlin.math.roundToInt

@Composable
Expand Down Expand Up @@ -89,7 +89,7 @@ fun FestivalToggle(
modifier = Modifier.align(Alignment.CenterStart)
.offset { IntOffset(textState.roundToInt(), 0) },
text = "축제",
color = SikshaTheme.colors.White,
color = SikshaColors.White900,
fontSize = 11.sp,
fontWeight = FontWeight.Bold
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Dialog
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SikshaColors

@Composable
fun CommentDetailDialog(
Expand All @@ -33,7 +33,7 @@ fun CommentDetailDialog(
Column(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier
.background(color = SikshaTheme.colors.White, shape = RoundedCornerShape(26.dp))
.background(color = SikshaColors.White900, shape = RoundedCornerShape(26.dp))
) {
if (isMine) {
Box(
Expand All @@ -55,7 +55,7 @@ fun CommentDetailDialog(
}
Divider(
modifier = Modifier.padding(horizontal = 11.dp),
color = SikshaTheme.colors.BorderPrimary,
color = Color(0xFFE0E0E0),
thickness = 1.dp
)
}
Expand All @@ -79,7 +79,7 @@ fun CommentDetailDialog(
}
Divider(
modifier = Modifier.padding(horizontal = 11.dp),
color = SikshaTheme.colors.BorderPrimary,
color = Color(0xFFE0E0E0),
thickness = 1.dp
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.text.TextLayoutResult
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.unit.dp
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SikshaColors

@Composable
fun CommentEditText(
Expand All @@ -35,7 +36,7 @@ fun CommentEditText(
trailingIcon: @Composable () -> Unit = {},
enabled: Boolean = true,
readOnly: Boolean = false,
textStyle: TextStyle = TextStyle.Default.copy(SikshaTheme.colors.Gray900),
textStyle: TextStyle = TextStyle.Default,
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
keyboardActions: KeyboardActions = KeyboardActions.Default,
singleLine: Boolean = false,
Expand All @@ -44,7 +45,7 @@ fun CommentEditText(
visualTransformation: VisualTransformation = VisualTransformation.None,
onTextLayout: (TextLayoutResult) -> Unit = {},
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
cursorBrush: Brush = SolidColor(SikshaTheme.colors.Black)
cursorBrush: Brush = SolidColor(Color.Black)
) {
BasicTextField(
value = value,
Expand All @@ -66,7 +67,7 @@ fun CommentEditText(
Row(
modifier = Modifier
.background(
color = SikshaTheme.colors.Gray100,
color = SikshaColors.Gray100,
shape = RoundedCornerShape(8.dp)
)
.height(IntrinsicSize.Min),
Expand All @@ -85,7 +86,7 @@ fun CommentEditText(
hint?.let {
Text(
text = hint,
style = textStyle.copy(color = SikshaTheme.colors.Gray400)
style = textStyle.copy(color = SikshaColors.Gray400)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.hilt.navigation.compose.hiltViewModel
import com.wafflestudio.siksha2.ui.SikshaColors
import com.wafflestudio.siksha2.components.compose.TopBar
import com.wafflestudio.siksha2.ui.SikshaTheme
import com.wafflestudio.siksha2.ui.SpeechBubbleIcon
Expand Down Expand Up @@ -79,7 +80,7 @@ fun CommentReportScreen(
Column(
modifier = Modifier
.fillMaxSize()
.background(SikshaTheme.colors.White)
.background(SikshaColors.White900)
) {
TopBar(
title = "신고하기",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.material.Divider
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import com.wafflestudio.siksha2.ui.SikshaTheme

@Composable
fun CommunityDivider(
modifier: Modifier = Modifier
) {
Divider(
color = SikshaTheme.colors.Gray100,
color = Color(0xFFF0F0F0),
thickness = 1.dp,
modifier = modifier.padding(horizontal = 7.5.dp)
)
Expand Down
Loading
Loading