Skip to content

Commit

Permalink
update ui: light, dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
nqmgaming committed Jun 4, 2024
1 parent 121ef6c commit 3e4e913
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
12 changes: 12 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.LocationOn
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
Expand Down Expand Up @@ -77,7 +78,7 @@ fun AddressItem(
modifier = Modifier
.size(32.dp)
.background(
color = Color.Gray.copy(alpha = 0.23f),
color = MaterialTheme.colorScheme.primary.copy(alpha = 0.1f),
shape = CircleShape
)
) {
Expand All @@ -87,7 +88,7 @@ fun AddressItem(
modifier = Modifier
.size(18.dp)
.padding(2.dp),
tint = Color.Black.copy(alpha = 0.8f)
tint = MaterialTheme.colorScheme.secondary
)
}
Text(text = item.position?.let {
Expand All @@ -107,7 +108,7 @@ fun AddressItem(
val title = item.title
val titleSpanStyle = if (title!!.contains(query, ignoreCase = true)) {
SpanStyle(
color = Color.Black,
color = MaterialTheme.colorScheme.primary,
)
} else {
SpanStyle()
Expand All @@ -116,7 +117,7 @@ fun AddressItem(
val label = item.address?.label ?: ""
val labelSpanStyle = if (label.contains(query, ignoreCase = true)) {
SpanStyle(
color = Color.Black,
color = MaterialTheme.colorScheme.primary,
fontSize = 12.sp
)
} else {
Expand Down Expand Up @@ -148,7 +149,7 @@ fun AddressItem(
Icon(
painter = painterResource(id = R.drawable.ic_right_square),
contentDescription = "Turn Right",
tint = Color.Black.copy(alpha = 0.5f),
tint = MaterialTheme.colorScheme.primary,
modifier = Modifier
.size(24.dp)
.clickable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.nqmgaming.searchaddresslab.ui.theme

import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
Expand All @@ -9,16 +8,17 @@ import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext

private val DarkColorScheme = darkColorScheme(
primary = Purple80,
primary = Color.White,
secondary = PurpleGrey80,
tertiary = Pink80
tertiary = Pink80,
)

private val LightColorScheme = lightColorScheme(
primary = Purple40,
primary = Color.Black,
secondary = PurpleGrey40,
tertiary = Pink40

Expand Down

0 comments on commit 3e4e913

Please sign in to comment.