idk a lot of changes
This commit is contained in:
parent
5ddb6ea9ef
commit
38624bcbc5
8
.idea/deploymentTargetSelector.xml
generated
8
.idea/deploymentTargetSelector.xml
generated
@ -4,6 +4,14 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2025-04-20T19:39:49.761800600Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\forgi\.android\avd\Pixel_9.avd" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
<DialogSelection />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
</component>
|
||||
|
@ -2,7 +2,6 @@ plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
id("com.google.relay") version "0.3.12"
|
||||
}
|
||||
|
||||
android {
|
||||
@ -41,7 +40,6 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.lifecycle.runtime.ktx)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
|
@ -3,18 +3,18 @@ package com.f1rq.lifemap
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.systemBarsPadding
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import com.f1rq.lifemap.navigationbar.NavigationBar
|
||||
import androidx.compose.runtime.SideEffect
|
||||
import androidx.compose.ui.platform.LocalView
|
||||
import com.f1rq.lifemap.screens.ListView
|
||||
import com.f1rq.lifemap.screens.MapView
|
||||
import com.f1rq.lifemap.screens.SettingsScreen
|
||||
@ -24,14 +24,27 @@ import com.f1rq.lifemap.ui.theme.ActiveNavColor
|
||||
import com.f1rq.lifemap.ui.theme.InactiveNavColor
|
||||
import com.f1rq.lifemap.components.TopBar
|
||||
import com.f1rq.lifemap.components.NavBar
|
||||
import com.f1rq.lifemap.screens.settingsScreens.SettingsNotificationsScreen
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
|
||||
setContent {
|
||||
LifeMapTheme {
|
||||
val navController = rememberNavController()
|
||||
|
||||
val view = LocalView.current
|
||||
val darkTheme = !isSystemInDarkTheme()
|
||||
SideEffect {
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
val insetsController = WindowCompat.getInsetsController(window, view)
|
||||
insetsController.isAppearanceLightStatusBars = true
|
||||
insetsController.isAppearanceLightNavigationBars = true
|
||||
}
|
||||
|
||||
Scaffold(
|
||||
topBar = {
|
||||
TopBar(
|
||||
@ -58,31 +71,12 @@ class MainActivity : ComponentActivity() {
|
||||
) {
|
||||
composable("mapview") { MapView(Modifier) }
|
||||
composable("listview") { ListView(Modifier) }
|
||||
composable("settings") { SettingsScreen(Modifier)}
|
||||
composable("settings") { SettingsScreen(navController = navController, Modifier)}
|
||||
composable("notifications") { NotificationsScreen(Modifier)}
|
||||
composable("settings_notifications") { SettingsNotificationsScreen(Modifier) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(showBackground = true)
|
||||
@Composable
|
||||
fun GreetingPreview() {
|
||||
LifeMapTheme {
|
||||
Scaffold(
|
||||
topBar = {
|
||||
TopBar()
|
||||
},
|
||||
bottomBar = {
|
||||
NavigationBar(
|
||||
onWorldViewTapped = {},
|
||||
onListViewTapped = {}
|
||||
)
|
||||
}
|
||||
) { innerPadding ->
|
||||
MapView(Modifier.padding(innerPadding))
|
||||
}
|
||||
}
|
||||
}
|
@ -12,15 +12,17 @@ import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Edit
|
||||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.f1rq.lifemap.ui.theme.MainBG
|
||||
import com.f1rq.lifemap.ui.theme.MainTextColor
|
||||
import com.f1rq.lifemap.ui.theme.ButtonColor
|
||||
import com.f1rq.lifemap.ui.theme.PrimaryColor
|
||||
import com.f1rq.lifemap.R.drawable.add_event_button
|
||||
import com.f1rq.lifemap.R.drawable.navbar_mapview_button
|
||||
|
||||
@Composable
|
||||
fun AddEventCard(
|
||||
@ -32,7 +34,7 @@ fun AddEventCard(
|
||||
.fillMaxWidth()
|
||||
.padding(8.dp),
|
||||
shape = RoundedCornerShape(16.dp),
|
||||
elevation = CardDefaults.cardElevation(defaultElevation = 6.dp),
|
||||
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp),
|
||||
colors = CardDefaults.cardColors(
|
||||
containerColor = MainBG,
|
||||
)
|
||||
@ -65,7 +67,7 @@ fun AddEventCard(
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.shadow(
|
||||
elevation = 6.dp,
|
||||
elevation = 3.dp,
|
||||
shape = RoundedCornerShape(12.dp),
|
||||
clip = false
|
||||
)
|
||||
@ -80,9 +82,9 @@ fun AddEventCard(
|
||||
modifier = Modifier.fillMaxSize()
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.Edit,
|
||||
painter = painterResource(id = add_event_button),
|
||||
contentDescription = "Edit",
|
||||
tint = ButtonColor
|
||||
tint = PrimaryColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -7,92 +7,99 @@ import androidx.compose.material3.IconButton
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.Card
|
||||
import androidx.compose.material3.CardDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.drawBehind
|
||||
import androidx.compose.ui.geometry.Offset
|
||||
import androidx.compose.ui.geometry.Size
|
||||
import androidx.compose.ui.graphics.Brush
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import com.f1rq.lifemap.ui.theme.MainBG
|
||||
import com.f1rq.lifemap.ui.theme.InactiveNavColor
|
||||
import com.f1rq.lifemap.ui.theme.ActiveNavColor
|
||||
import com.f1rq.lifemap.ui.theme.ButtonColor
|
||||
import com.f1rq.lifemap.ui.theme.PrimaryColor
|
||||
import com.f1rq.lifemap.R.drawable.navbar_listview_button
|
||||
import com.f1rq.lifemap.R.drawable.navbar_mapview_button
|
||||
import com.google.relay.compose.BoxScopeInstanceImpl.align
|
||||
|
||||
@Composable
|
||||
fun NavBar(
|
||||
modifier: Modifier = Modifier,
|
||||
onMapViewClicked: () -> Unit = {},
|
||||
onListViewClicked: () -> Unit = {},
|
||||
mapViewBackgroundColor: Color = ActiveNavColor,
|
||||
listViewBackgroundColor: Color = InactiveNavColor,
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
Box(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.background(
|
||||
color = MainBG,
|
||||
shape = RoundedCornerShape(
|
||||
topStart = 16.dp,
|
||||
topEnd = 16.dp,
|
||||
bottomStart = 0.dp,
|
||||
bottomEnd = 0.dp
|
||||
)
|
||||
)
|
||||
.padding(
|
||||
top = 12.dp,
|
||||
bottom = WindowInsets.navigationBars.asPaddingValues().calculateBottomPadding() + 6.dp,
|
||||
),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
// Left Half - Map View Button
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
IconButton(
|
||||
onClick = onMapViewClicked,
|
||||
modifier = Modifier
|
||||
.size(48.dp)
|
||||
.background(
|
||||
color = mapViewBackgroundColor,
|
||||
shape = RoundedCornerShape(16.dp)
|
||||
)
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = navbar_mapview_button),
|
||||
contentDescription = "Map View",
|
||||
modifier = Modifier
|
||||
.requiredSize(24.dp),
|
||||
tint = ButtonColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Right Half - List View Button
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f),
|
||||
contentAlignment = Alignment.Center
|
||||
Card(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
colors = CardDefaults.cardColors(containerColor = MainBG),
|
||||
elevation = CardDefaults.cardElevation(defaultElevation = 6.dp),
|
||||
) {
|
||||
IconButton(
|
||||
onClick = onListViewClicked,
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.size(48.dp)
|
||||
.background(
|
||||
color = listViewBackgroundColor,
|
||||
shape = RoundedCornerShape(16.dp)
|
||||
)
|
||||
.padding(
|
||||
top = 12.dp,
|
||||
bottom = WindowInsets.navigationBars.asPaddingValues().calculateBottomPadding() + 6.dp,
|
||||
),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = navbar_listview_button),
|
||||
contentDescription = "List View",
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.requiredSize(24.dp),
|
||||
tint = ButtonColor
|
||||
)
|
||||
.weight(1f),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
IconButton(
|
||||
onClick = onMapViewClicked,
|
||||
modifier = Modifier
|
||||
.size(48.dp)
|
||||
.background(
|
||||
color = mapViewBackgroundColor,
|
||||
shape = RoundedCornerShape(16.dp)
|
||||
)
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = navbar_mapview_button),
|
||||
contentDescription = "Map View",
|
||||
modifier = Modifier.requiredSize(24.dp),
|
||||
tint = PrimaryColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.weight(1f),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
IconButton(
|
||||
onClick = onListViewClicked,
|
||||
modifier = Modifier
|
||||
.size(48.dp)
|
||||
.background(
|
||||
color = listViewBackgroundColor,
|
||||
shape = RoundedCornerShape(16.dp)
|
||||
)
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = navbar_listview_button),
|
||||
contentDescription = "List View",
|
||||
modifier = Modifier.requiredSize(24.dp),
|
||||
tint = PrimaryColor
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,63 @@
|
||||
package com.f1rq.lifemap.components
|
||||
|
||||
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.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Edit
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.f1rq.lifemap.ui.theme.MainBG
|
||||
import com.f1rq.lifemap.ui.theme.MainTextColor
|
||||
import com.f1rq.lifemap.ui.theme.PrimaryColor
|
||||
|
||||
@Composable
|
||||
fun SettingsLabel(
|
||||
modifier: Modifier = Modifier,
|
||||
text: String,
|
||||
iconResource: ImageVector = Icons.Default.Edit,
|
||||
desc: String? = null,
|
||||
onClick: () -> Unit = {},
|
||||
) {
|
||||
Card(
|
||||
modifier = modifier
|
||||
.fillMaxWidth()
|
||||
.padding(8.dp),
|
||||
shape = RoundedCornerShape(16.dp),
|
||||
colors = CardDefaults.cardColors(
|
||||
containerColor = MainBG,
|
||||
),
|
||||
onClick = onClick,
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
horizontal = 16.dp,
|
||||
vertical = 12.dp,
|
||||
),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Icon(
|
||||
imageVector = iconResource,
|
||||
contentDescription = desc,
|
||||
tint = PrimaryColor
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.size(12.dp))
|
||||
|
||||
Text(
|
||||
text = text,
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
color = MainTextColor
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.f1rq.lifemap.components
|
||||
|
||||
import android.graphics.drawable.shapes.Shape
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.*
|
||||
@ -11,13 +12,15 @@ import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.RectangleShape
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import com.f1rq.lifemap.ui.theme.MainBG
|
||||
import com.f1rq.lifemap.ui.theme.MainTextColor
|
||||
import com.f1rq.lifemap.ui.theme.ButtonColor
|
||||
import com.f1rq.lifemap.ui.theme.PrimaryColor
|
||||
import com.f1rq.lifemap.R.drawable.notifications_button
|
||||
import com.f1rq.lifemap.R.drawable.settings_button
|
||||
|
||||
@ -29,8 +32,7 @@ fun TopBar(
|
||||
) {
|
||||
Card(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(top = WindowInsets.statusBars.asPaddingValues().calculateTopPadding()),
|
||||
.fillMaxWidth(),
|
||||
shape = RoundedCornerShape(
|
||||
topStart = 0.dp,
|
||||
topEnd = 0.dp,
|
||||
@ -46,7 +48,7 @@ fun TopBar(
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
start = 20.0.dp,
|
||||
top = 10.0.dp,
|
||||
top = WindowInsets.statusBars.asPaddingValues().calculateTopPadding(),
|
||||
end = 20.0.dp,
|
||||
bottom = 15.0.dp
|
||||
),
|
||||
@ -85,7 +87,7 @@ fun TopBar(
|
||||
Icon(
|
||||
painter = painterResource(id = notifications_button),
|
||||
contentDescription = "Notifications button",
|
||||
tint = ButtonColor
|
||||
tint = PrimaryColor
|
||||
)
|
||||
}
|
||||
IconButton(
|
||||
@ -94,7 +96,7 @@ fun TopBar(
|
||||
Icon(
|
||||
painter = painterResource(id = settings_button),
|
||||
contentDescription = "Settings button",
|
||||
tint = ButtonColor
|
||||
tint = PrimaryColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ import androidx.compose.ui.Modifier
|
||||
fun ListView(modifier: Modifier = Modifier) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.systemBarsPadding(),
|
||||
.fillMaxSize(),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Text("List view")
|
||||
|
@ -1,23 +1,21 @@
|
||||
package com.f1rq.lifemap.screens
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.systemBarsPadding
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import com.f1rq.lifemap.components.AddEventCard
|
||||
|
||||
|
||||
@Composable
|
||||
fun MapView(modifier: Modifier = Modifier) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.systemBarsPadding()
|
||||
|
||||
) {
|
||||
Text(
|
||||
text = "Map view",
|
||||
|
@ -1,18 +1,39 @@
|
||||
package com.f1rq.lifemap.screens
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.f1rq.lifemap.ui.theme.MainTextColor
|
||||
|
||||
@Composable
|
||||
fun NotificationsScreen(modifier: Modifier = Modifier) {
|
||||
Box(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentAlignment = Alignment.Center
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
) {
|
||||
Text("Notifications")
|
||||
Column(
|
||||
verticalArrangement = Arrangement.spacedBy(4.dp),
|
||||
) {
|
||||
Text(
|
||||
text = "Settings",
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
fontSize = MaterialTheme.typography.titleLarge.fontSize,
|
||||
fontFamily = MaterialTheme.typography.titleLarge.fontFamily,
|
||||
color = MainTextColor,
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
top = 24.dp,
|
||||
start = 24.dp
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +1,78 @@
|
||||
package com.f1rq.lifemap.screens
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.outlined.List
|
||||
import androidx.compose.material.icons.filled.MailOutline
|
||||
import androidx.compose.material.icons.filled.Notifications
|
||||
import androidx.compose.material.icons.outlined.Email
|
||||
import androidx.compose.material.icons.outlined.Notifications
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.navigation.NavController
|
||||
import com.f1rq.lifemap.components.SettingsLabel
|
||||
import com.f1rq.lifemap.ui.theme.MainTextColor
|
||||
import com.f1rq.lifemap.R.drawable.contact_icon
|
||||
import com.f1rq.lifemap.R.drawable.feedback_icon
|
||||
|
||||
@Composable
|
||||
fun SettingsScreen(modifier: Modifier = Modifier) {
|
||||
fun SettingsScreen(navController: NavController, modifier: Modifier = Modifier) {
|
||||
Box(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
contentAlignment = Alignment.Center
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
) {
|
||||
Text("Settings screen")
|
||||
Column (
|
||||
verticalArrangement = Arrangement.spacedBy(4.dp),
|
||||
) {
|
||||
Text(
|
||||
text = "Settings",
|
||||
style = MaterialTheme.typography.titleMedium,
|
||||
fontSize = MaterialTheme.typography.titleLarge.fontSize,
|
||||
fontFamily = MaterialTheme.typography.titleLarge.fontFamily,
|
||||
color = MainTextColor,
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
top = 24.dp,
|
||||
start = 24.dp
|
||||
),
|
||||
)
|
||||
SettingsLabel(
|
||||
text = "Notifications",
|
||||
iconResource = Icons.Outlined.Notifications,
|
||||
desc = "Notifications",
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
horizontal = 16.dp
|
||||
),
|
||||
onClick = { navController.navigate("settings_notifications") }
|
||||
)
|
||||
|
||||
SettingsLabel(
|
||||
text = "Contact",
|
||||
iconResource = Icons.Outlined.Email,
|
||||
desc = "Contact us",
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
horizontal = 16.dp
|
||||
)
|
||||
)
|
||||
|
||||
SettingsLabel(
|
||||
text = "Report a bug",
|
||||
iconResource = Icons.Outlined.Email,
|
||||
desc = "Report a bug",
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
horizontal = 16.dp
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.f1rq.lifemap.screens.settingsScreens
|
||||
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
|
||||
@Composable
|
||||
fun SettingsNotificationsScreen(modifier: Modifier = Modifier) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize(),
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Text("Notifications settings")
|
||||
}
|
||||
}
|
@ -2,16 +2,11 @@ package com.f1rq.lifemap.ui.theme
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
val Purple80 = Color(0xFFD0BCFF)
|
||||
val PurpleGrey80 = Color(0xFFCCC2DC)
|
||||
val Pink80 = Color(0xFFEFB8C8)
|
||||
val Purple40 = Color(0xFF6650a4)
|
||||
val PurpleGrey40 = Color(0xFF625b71)
|
||||
val Pink40 = Color(0xFF7D5260)
|
||||
|
||||
|
||||
val MainBG = Color(0xFFECECEC)
|
||||
val SecondaryBG = Color(0xFFDDDDDD)
|
||||
val PrimaryColor = Color(0xFF49454F)
|
||||
val MainTextColor = Color(0xFF1D1B20)
|
||||
|
||||
val ActiveNavColor = Color(0xFFDDDDDD)
|
||||
val InactiveNavColor = Color.Transparent
|
||||
val MainTextColor = Color(0xFF1D1B20)
|
||||
val ButtonColor = Color(0xFF49454F)
|
||||
|
||||
|
@ -1,29 +1,21 @@
|
||||
package com.f1rq.lifemap.ui.theme
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Build
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
//import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.dynamicDarkColorScheme
|
||||
import androidx.compose.material3.dynamicLightColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
|
||||
private val DarkColorScheme = darkColorScheme(
|
||||
primary = Purple80,
|
||||
secondary = PurpleGrey80,
|
||||
tertiary = Pink80
|
||||
)
|
||||
|
||||
private val LightColorScheme = lightColorScheme(
|
||||
primary = Purple40,
|
||||
secondary = PurpleGrey40,
|
||||
tertiary = Pink40
|
||||
primary = PrimaryColor,
|
||||
secondary = MainTextColor,
|
||||
background = MainBG
|
||||
|
||||
/* Other default colors to override
|
||||
background = Color(0xFFFFFBFE),
|
||||
surface = Color(0xFFFFFBFE),
|
||||
onPrimary = Color.White,
|
||||
onSecondary = Color.White,
|
||||
@ -35,18 +27,19 @@ private val LightColorScheme = lightColorScheme(
|
||||
|
||||
@Composable
|
||||
fun LifeMapTheme(
|
||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
// Dynamic color is available on Android 12+
|
||||
dynamicColor: Boolean = true,
|
||||
//darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
darkTheme: Boolean = false,
|
||||
dynamicColor: Boolean = false, //was true
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
val colorScheme = when {
|
||||
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||
val context = LocalContext.current
|
||||
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
|
||||
//if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
|
||||
dynamicLightColorScheme(context)
|
||||
}
|
||||
|
||||
darkTheme -> DarkColorScheme
|
||||
//darkTheme -> DarkColorScheme
|
||||
else -> LightColorScheme
|
||||
}
|
||||
|
||||
|
5
app/src/main/res/drawable/contact_icon.xml
Normal file
5
app/src/main/res/drawable/contact_icon.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8l8,5 8,-5v10zM12,11L4,6h16l-8,5z"/>
|
||||
|
||||
</vector>
|
5
app/src/main/res/drawable/feedback_icon.xml
Normal file
5
app/src/main/res/drawable/feedback_icon.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="@android:color/white" android:pathData="M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM13,14h-2v-2h2v2zM13,10h-2L11,6h2v4z"/>
|
||||
|
||||
</vector>
|
@ -4,7 +4,6 @@
|
||||
<style name="Theme.LifeMap" parent="android:Theme.Material.Light.NoActionBar">
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
</style>
|
||||
</resources>
|
@ -3,5 +3,4 @@ plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.kotlin.compose) apply false
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user