fix colors, edit readme
This commit is contained in:
parent
1ef03f86fc
commit
86b4e842f9
|
|
@ -4,18 +4,29 @@
|
|||
<value>
|
||||
<entry key="app">
|
||||
<State>
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="C:\Users\79967\.android\avd\Pixel_7_Pro_API_30.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<targetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="C:\Users\79967\.android\avd\Pixel_8_Pro_API_34.avd" />
|
||||
<value value="C:\Users\79967\.android\avd\Pixel_7_Pro_API_30.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2024-03-20T12:26:55.260824800Z" />
|
||||
<timeTargetWasSelectedWithDropDown value="2024-03-24T14:07:23.908937400Z" />
|
||||
</State>
|
||||
</entry>
|
||||
</value>
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -1,6 +1,12 @@
|
|||
# android_notes
|
||||
Android note taking application. Build with Jetpack Compose.
|
||||
[Click here to get apk][1]
|
||||
Android note taking application. [Click here to get apk][1]
|
||||
|
||||
Build with:
|
||||
Jetpack Compose
|
||||
Compose Navigation
|
||||
Room
|
||||
Hilt
|
||||
MVVM
|
||||
|
||||
<img src="./assets/main_light.png" width=200><img src="./assets/main_dark.png" width=200><img src="./assets/recycle_bin.png" width=200><img src="./assets/recover.png" width=200>
|
||||
<img src="./assets/android_note.gif" width=200>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ android {
|
|||
minSdk = 26
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
versionName = "1.1"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -2,9 +2,11 @@ package com.kassaev.notes.pesentation.main_screen
|
|||
|
||||
import androidx.compose.foundation.layout.requiredWidth
|
||||
import androidx.compose.material3.DrawerValue
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.ModalDrawerSheet
|
||||
import androidx.compose.material3.ModalNavigationDrawer
|
||||
import androidx.compose.material3.NavigationDrawerItem
|
||||
import androidx.compose.material3.NavigationDrawerItemDefaults
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.rememberDrawerState
|
||||
import androidx.compose.runtime.Composable
|
||||
|
|
@ -43,7 +45,12 @@ fun MainScreenNavigationDrawer(
|
|||
scope.launch {
|
||||
drawerState.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
colors = NavigationDrawerItemDefaults.colors(
|
||||
selectedContainerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
selectedTextColor = MaterialTheme.colorScheme.primary,
|
||||
unselectedTextColor = MaterialTheme.colorScheme.primary,
|
||||
)
|
||||
)
|
||||
NavigationDrawerItem(
|
||||
label = {
|
||||
|
|
@ -55,7 +62,12 @@ fun MainScreenNavigationDrawer(
|
|||
scope.launch {
|
||||
drawerState.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
colors = NavigationDrawerItemDefaults.colors(
|
||||
selectedContainerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
selectedTextColor = MaterialTheme.colorScheme.primary,
|
||||
unselectedTextColor = MaterialTheme.colorScheme.primary,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -76,13 +88,4 @@ fun MainScreenNavigationDrawer(
|
|||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun String.toLocale(): String {
|
||||
return when(this){
|
||||
"main" -> stringResource(R.string.app_name)
|
||||
"recycle_bin" -> stringResource(R.string.recycle_bin)
|
||||
else -> {""}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,12 +14,14 @@ import androidx.compose.material.icons.Icons
|
|||
import androidx.compose.material.icons.outlined.Add
|
||||
import androidx.compose.material.icons.outlined.Menu
|
||||
import androidx.compose.material3.Card
|
||||
import androidx.compose.material3.CardDefaults
|
||||
import androidx.compose.material3.Divider
|
||||
import androidx.compose.material3.DrawerState
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.FloatingActionButton
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.IconButtonDefaults
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
|
|
@ -27,7 +29,6 @@ import androidx.compose.material3.TextButton
|
|||
import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.material3.TopAppBarDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
|
|
@ -67,7 +68,10 @@ fun MainScreenScaffold(
|
|||
scope.launch {
|
||||
drawerState.open()
|
||||
}
|
||||
}
|
||||
},
|
||||
colors = IconButtonDefaults.iconButtonColors(
|
||||
contentColor = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Outlined.Menu,
|
||||
|
|
@ -76,12 +80,14 @@ fun MainScreenScaffold(
|
|||
}
|
||||
},
|
||||
colors = TopAppBarDefaults.topAppBarColors(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
titleContentColor = MaterialTheme.colorScheme.primary
|
||||
),
|
||||
)
|
||||
},
|
||||
floatingActionButton = {
|
||||
FloatingActionButton(
|
||||
contentColor = MaterialTheme.colorScheme.primary,
|
||||
onClick = {
|
||||
navController.navigate(Screen.MainScreenDetail.route)
|
||||
}
|
||||
|
|
@ -125,7 +131,7 @@ fun MainScreenScaffold(
|
|||
end = 8.dp,
|
||||
bottom = 8.dp
|
||||
),
|
||||
text = noteEntity.date.toString(),
|
||||
text = noteEntity.date,
|
||||
textAlign = TextAlign.End,
|
||||
fontSize = MaterialTheme.typography.bodyMedium.fontSize
|
||||
)
|
||||
|
|
@ -148,6 +154,10 @@ fun DeleteConfirmDialog(viewModel: MainViewModel) {
|
|||
Card(
|
||||
modifier = Modifier,
|
||||
shape = RoundedCornerShape(16.dp),
|
||||
colors = CardDefaults.cardColors(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
contentColor = MaterialTheme.colorScheme.primary,
|
||||
)
|
||||
) {
|
||||
Column {
|
||||
Text(
|
||||
|
|
|
|||
|
|
@ -14,12 +14,14 @@ import androidx.compose.material.icons.Icons
|
|||
import androidx.compose.material.icons.outlined.Delete
|
||||
import androidx.compose.material.icons.outlined.Menu
|
||||
import androidx.compose.material3.Card
|
||||
import androidx.compose.material3.CardDefaults
|
||||
import androidx.compose.material3.Divider
|
||||
import androidx.compose.material3.DrawerState
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.FloatingActionButton
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.IconButtonDefaults
|
||||
import androidx.compose.material3.LocalTextStyle
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Scaffold
|
||||
|
|
@ -28,7 +30,6 @@ import androidx.compose.material3.TextButton
|
|||
import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.material3.TopAppBarDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
|
|
@ -65,6 +66,9 @@ fun RecycleBinScreenScaffold(
|
|||
},
|
||||
navigationIcon = {
|
||||
IconButton(
|
||||
colors = IconButtonDefaults.iconButtonColors(
|
||||
contentColor = MaterialTheme.colorScheme.primary
|
||||
),
|
||||
onClick = {
|
||||
scope.launch {
|
||||
drawerState.open()
|
||||
|
|
@ -78,12 +82,14 @@ fun RecycleBinScreenScaffold(
|
|||
}
|
||||
},
|
||||
colors = TopAppBarDefaults.topAppBarColors(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
titleContentColor = MaterialTheme.colorScheme.primary
|
||||
),
|
||||
)
|
||||
},
|
||||
floatingActionButton = {
|
||||
FloatingActionButton(
|
||||
contentColor = MaterialTheme.colorScheme.primary,
|
||||
onClick = {
|
||||
if (noteList.isNotEmpty()){
|
||||
viewModel.openDialogFAB()
|
||||
|
|
@ -130,7 +136,7 @@ fun RecycleBinScreenScaffold(
|
|||
end = 8.dp,
|
||||
bottom = 8.dp
|
||||
),
|
||||
text = noteEntity.date.toString(),
|
||||
text = noteEntity.date,
|
||||
textAlign = TextAlign.End,
|
||||
fontSize = MaterialTheme.typography.bodyMedium.fontSize
|
||||
)
|
||||
|
|
@ -153,6 +159,10 @@ fun RecycleBinDeleteConfirmDialog(viewModel: MainViewModel) {
|
|||
Card(
|
||||
modifier = Modifier,
|
||||
shape = RoundedCornerShape(16.dp),
|
||||
colors = CardDefaults.cardColors(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
contentColor = MaterialTheme.colorScheme.primary,
|
||||
)
|
||||
) {
|
||||
Column {
|
||||
Text(
|
||||
|
|
@ -215,6 +225,10 @@ fun RecycleBinDeleteAllConfirmDialog(viewModel: MainViewModel) {
|
|||
Card(
|
||||
modifier = Modifier,
|
||||
shape = RoundedCornerShape(16.dp),
|
||||
colors = CardDefaults.cardColors(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
contentColor = MaterialTheme.colorScheme.primary,
|
||||
)
|
||||
) {
|
||||
Column {
|
||||
Text(
|
||||
|
|
|
|||
|
|
@ -10,3 +10,10 @@ val Purple40 = Color(0xFF6650a4)
|
|||
val PurpleGrey40 = Color(0xFF625b71)
|
||||
val Pink40 = Color(0xFF7D5260)
|
||||
|
||||
//Pixel 8 PRO colors
|
||||
|
||||
val Primary = Color(0xFF00668B)
|
||||
val PrimaryDark = Color(0xFF76D1FF)
|
||||
|
||||
val PrimaryContainer = Color(0xFFC1E8FF)
|
||||
val PrimaryContainerDark = Color(0xFF004C69)
|
||||
|
|
|
|||
|
|
@ -10,21 +10,24 @@ import androidx.compose.material3.dynamicLightColorScheme
|
|||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.SideEffect
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.toArgb
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.platform.LocalView
|
||||
import androidx.core.view.WindowCompat
|
||||
|
||||
private val DarkColorScheme = darkColorScheme(
|
||||
primary = Purple80,
|
||||
secondary = PurpleGrey80,
|
||||
tertiary = Pink80
|
||||
primary = PrimaryDark,
|
||||
secondary = PrimaryContainer,
|
||||
tertiary = Pink80,
|
||||
primaryContainer = PrimaryContainerDark,
|
||||
)
|
||||
|
||||
private val LightColorScheme = lightColorScheme(
|
||||
primary = Purple40,
|
||||
secondary = PurpleGrey40,
|
||||
tertiary = Pink40
|
||||
primary = Primary,
|
||||
secondary = Color.White,
|
||||
tertiary = Pink40,
|
||||
primaryContainer = PrimaryContainer
|
||||
|
||||
/* Other default colors to override
|
||||
background = Color(0xFFFFFBFE),
|
||||
|
|
|
|||
Loading…
Reference in New Issue