diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..b589d56
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
new file mode 100644
index 0000000..0c0c338
--- /dev/null
+++ b/.idea/deploymentTargetDropDown.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
new file mode 100644
index 0000000..b268ef3
--- /dev/null
+++ b/.idea/deploymentTargetSelector.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/icon.svg b/.idea/icon.svg
new file mode 100644
index 0000000..e2c15c2
--- /dev/null
+++ b/.idea/icon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..422f989
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..148fdd2
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index c2b3ddc..adc4eb8 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,7 +1,10 @@
-
+
+
+
+
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..2b63946
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index c09d2ae..a1489a2 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -1,6 +1,8 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
+ id("kotlin-kapt")
+ id("com.google.dagger.hilt.android")
}
android {
@@ -40,7 +42,7 @@ android {
compose = true
}
composeOptions {
- kotlinCompilerExtensionVersion = "1.5.1"
+ kotlinCompilerExtensionVersion = "1.5.14"
}
packaging {
resources {
@@ -50,20 +52,38 @@ android {
}
dependencies {
-
- implementation("androidx.core:core-ktx:1.10.1")
- implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
- implementation("androidx.activity:activity-compose:1.7.0")
- implementation(platform("androidx.compose:compose-bom:2023.08.00"))
+ // android lib
+ implementation("androidx.core:core-ktx:1.13.1")
+ implementation ("androidx.core:core-splashscreen:1.0.1")
+ implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.3")
+ // compose
+ implementation("androidx.activity:activity-compose:1.9.0")
+ implementation(platform("androidx.compose:compose-bom:2024.06.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
- testImplementation("junit:junit:4.13.2")
- androidTestImplementation("androidx.test.ext:junit:1.1.5")
- androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
- androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
- androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
+ androidTestImplementation(platform("androidx.compose:compose-bom:2024.06.00"))
+ androidTestImplementation("androidx.compose.ui:ui-test-junit4")
+ // junit
+ testImplementation("junit:junit:4.13.2")
+ androidTestImplementation("androidx.test.ext:junit:1.2.1")
+ androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
+ // hilt
+ val hilt = "2.44"
+ implementation("com.google.dagger:hilt-android:$hilt")
+ kapt("com.google.dagger:hilt-android-compiler:$hilt")
+ val navVersion = "2.7.7"
+ implementation("androidx.navigation:navigation-fragment-ktx:$navVersion")
+ implementation("androidx.navigation:navigation-ui-ktx:$navVersion")
+ implementation("androidx.navigation:navigation-dynamic-features-fragment:$navVersion")
+ androidTestImplementation("androidx.navigation:navigation-testing:$navVersion")
+ implementation("androidx.navigation:navigation-compose:$navVersion")
+
+}
+
+kapt {
+ correctErrorTypes = true
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 96afd1d..8254d20 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -3,23 +3,22 @@
xmlns:tools="http://schemas.android.com/tools">
+ android:theme="@style/Theme.LightNovelReader.Starting">
-
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/GardenActivity.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/GardenActivity.kt
new file mode 100644
index 0000000..5d9b19b
--- /dev/null
+++ b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/GardenActivity.kt
@@ -0,0 +1,20 @@
+package indi.dmzz_yyhyy.lightnovelreader
+
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import dagger.hilt.android.AndroidEntryPoint
+import indi.dmzz_yyhyy.lightnovelreader.ui.LightNovelReaderApp
+import indi.dmzz_yyhyy.lightnovelreader.ui.theme.LightNovelReaderTheme
+
+@AndroidEntryPoint
+class MainActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContent {
+ LightNovelReaderTheme {
+ LightNovelReaderApp()
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/LightNovelReaderApplication.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/LightNovelReaderApplication.kt
new file mode 100644
index 0000000..a81d344
--- /dev/null
+++ b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/LightNovelReaderApplication.kt
@@ -0,0 +1,8 @@
+package indi.dmzz_yyhyy.lightnovelreader
+
+import android.app.Application
+import dagger.hilt.android.HiltAndroidApp
+
+@HiltAndroidApp
+class LightNovelReaderApplication : Application() {
+}
\ No newline at end of file
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/MainActivity.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/MainActivity.kt
deleted file mode 100644
index 15ef417..0000000
--- a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/MainActivity.kt
+++ /dev/null
@@ -1,46 +0,0 @@
-package indi.dmzz_yyhyy.lightnovelreader
-
-import android.os.Bundle
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.Surface
-import androidx.compose.material3.Text
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.tooling.preview.Preview
-import indi.dmzz_yyhyy.lightnovelreader.ui.theme.LightNovelReaderRefactoringTheme
-
-class MainActivity : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContent {
- LightNovelReaderRefactoringTheme {
- // A surface container using the 'background' color from the theme
- Surface(
- modifier = Modifier.fillMaxSize(),
- color = MaterialTheme.colorScheme.background
- ) {
- Greeting("Android")
- }
- }
- }
- }
-}
-
-@Composable
-fun Greeting(name: String, modifier: Modifier = Modifier) {
- Text(
- text = "Hello $name!",
- modifier = modifier
- )
-}
-
-@Preview(showBackground = true)
-@Composable
-fun GreetingPreview() {
- LightNovelReaderRefactoringTheme {
- Greeting("Android")
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/LightNovelReaderApp.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/LightNovelReaderApp.kt
new file mode 100644
index 0000000..b349b08
--- /dev/null
+++ b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/LightNovelReaderApp.kt
@@ -0,0 +1,29 @@
+package indi.dmzz_yyhyy.lightnovelreader.ui
+
+import androidx.compose.runtime.Composable
+import androidx.navigation.NavHostController
+import androidx.navigation.compose.NavHost
+import androidx.navigation.compose.composable
+import androidx.navigation.compose.rememberNavController
+import indi.dmzz_yyhyy.lightnovelreader.ui.home.HomeScreen
+
+@Composable
+fun LightNovelReaderApp() {
+ val navController = rememberNavController()
+ LightNovelReaderNavHost(navController)
+}
+
+@Composable
+fun LightNovelReaderNavHost(
+ navController: NavHostController
+) {
+ NavHost(navController = navController, startDestination = Screen.Home.Reading.route) {
+ composable(route = Screen.Home.route) {
+ HomeScreen(
+ onOpenBook = {
+ navController.navigate(Screen.Book.Detail.createRoute(it))
+ }
+ )
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/Screen.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/Screen.kt
new file mode 100644
index 0000000..1829d2b
--- /dev/null
+++ b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/Screen.kt
@@ -0,0 +1,35 @@
+package indi.dmzz_yyhyy.lightnovelreader.ui
+
+import androidx.navigation.NamedNavArgument
+import androidx.navigation.NavType
+import androidx.navigation.navArgument
+
+sealed class Screen(
+ val route: String,
+ val navArguments: List = emptyList()
+) {
+ data object Home : Screen("home") {
+ data object Reading : Screen("home/reading")
+ data object Exploration : Screen("home/exploration")
+ data object Bookshelf : Screen("home/bookshelf")
+ data object Settings : Screen("home/settings")
+ }
+ data object Book {
+ data object Detail : Screen(
+ route = "detail/{bookId}",
+ navArguments = listOf(navArgument("bookId") {
+ type = NavType.IntType
+ })
+ ) {
+ fun createRoute(bookId: Int) = "detail/${bookId}"
+ }
+ data object Content : Screen(
+ route = "content/content/{chapterId}",
+ navArguments = listOf(navArgument("chapterId") {
+ type = NavType.IntType
+ })
+ ) {
+ fun createRoute(chapterId: Int) = "content/${chapterId}"
+ }
+ }
+}
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/home/HomeScreen.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/home/HomeScreen.kt
new file mode 100644
index 0000000..92947b3
--- /dev/null
+++ b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/home/HomeScreen.kt
@@ -0,0 +1,22 @@
+package indi.dmzz_yyhyy.lightnovelreader.ui.home
+
+import androidx.compose.runtime.Composable
+import androidx.navigation.compose.NavHost
+import androidx.navigation.compose.composable
+import androidx.navigation.compose.rememberNavController
+import indi.dmzz_yyhyy.lightnovelreader.ui.Screen
+import indi.dmzz_yyhyy.lightnovelreader.ui.home.reading.ReadingScreen
+
+@Composable
+fun HomeScreen(
+ onOpenBook: (Int) -> Unit
+) {
+ val navController = rememberNavController()
+ NavHost(navController = navController, startDestination = Screen.Home.Reading.route) {
+ composable(route = Screen.Home.route) {
+ ReadingScreen(
+ onOpenBook = onOpenBook
+ )
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/home/reading/ReadingScreen.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/home/reading/ReadingScreen.kt
new file mode 100644
index 0000000..cd3b12c
--- /dev/null
+++ b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/home/reading/ReadingScreen.kt
@@ -0,0 +1,9 @@
+package indi.dmzz_yyhyy.lightnovelreader.ui.home.reading
+
+import androidx.compose.runtime.Composable
+
+@Composable
+fun ReadingScreen(
+ onOpenBook: (Int) -> Unit
+) {
+}
\ No newline at end of file
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Color.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Color.kt
index 7c5884e..98adba5 100644
--- a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Color.kt
+++ b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Color.kt
@@ -2,10 +2,67 @@ package indi.dmzz_yyhyy.lightnovelreader.ui.theme
import androidx.compose.ui.graphics.Color
-val Purple80 = Color(0xFFD0BCFF)
-val PurpleGrey80 = Color(0xFFCCC2DC)
-val Pink80 = Color(0xFFEFB8C8)
+val md_theme_light_primary = Color(0xFF3949E5)
+val md_theme_light_onPrimary = Color(0xFFFFFFFF)
+val md_theme_light_primaryContainer = Color(0xFFDFE0FF)
+val md_theme_light_onPrimaryContainer = Color(0xFF000766)
+val md_theme_light_secondary = Color(0xFF5C5D72)
+val md_theme_light_onSecondary = Color(0xFFFFFFFF)
+val md_theme_light_secondaryContainer = Color(0xFFE1E0F9)
+val md_theme_light_onSecondaryContainer = Color(0xFF181A2C)
+val md_theme_light_tertiary = Color(0xFF6052A6)
+val md_theme_light_onTertiary = Color(0xFFFFFFFF)
+val md_theme_light_tertiaryContainer = Color(0xFFE6DEFF)
+val md_theme_light_onTertiaryContainer = Color(0xFF1B0161)
+val md_theme_light_error = Color(0xFFBA1A1A)
+val md_theme_light_errorContainer = Color(0xFFFFDAD6)
+val md_theme_light_onError = Color(0xFFFFFFFF)
+val md_theme_light_onErrorContainer = Color(0xFF410002)
+val md_theme_light_background = Color(0xFFFFFBFF)
+val md_theme_light_onBackground = Color(0xFF1B1B1F)
+val md_theme_light_surface = Color(0xFFFFFBFF)
+val md_theme_light_onSurface = Color(0xFF1B1B1F)
+val md_theme_light_surfaceVariant = Color(0xFFE3E1EC)
+val md_theme_light_onSurfaceVariant = Color(0xFF46464F)
+val md_theme_light_outline = Color(0xFF777680)
+val md_theme_light_inverseOnSurface = Color(0xFFF3F0F4)
+val md_theme_light_inverseSurface = Color(0xFF303034)
+val md_theme_light_inversePrimary = Color(0xFFBDC2FF)
+val md_theme_light_shadow = Color(0xFF000000)
+val md_theme_light_surfaceTint = Color(0xFF3949E5)
+val md_theme_light_outlineVariant = Color(0xFFC7C5D0)
+val md_theme_light_scrim = Color(0xFF000000)
-val Purple40 = Color(0xFF6650a4)
-val PurpleGrey40 = Color(0xFF625b71)
-val Pink40 = Color(0xFF7D5260)
\ No newline at end of file
+val md_theme_dark_primary = Color(0xFFBDC2FF)
+val md_theme_dark_onPrimary = Color(0xFF0011A1)
+val md_theme_dark_primaryContainer = Color(0xFF1729CE)
+val md_theme_dark_onPrimaryContainer = Color(0xFFDFE0FF)
+val md_theme_dark_secondary = Color(0xFFC4C4DD)
+val md_theme_dark_onSecondary = Color(0xFF2D2F42)
+val md_theme_dark_secondaryContainer = Color(0xFF444559)
+val md_theme_dark_onSecondaryContainer = Color(0xFFE1E0F9)
+val md_theme_dark_tertiary = Color(0xFFC9BEFF)
+val md_theme_dark_onTertiary = Color(0xFF312075)
+val md_theme_dark_tertiaryContainer = Color(0xFF48398D)
+val md_theme_dark_onTertiaryContainer = Color(0xFFE6DEFF)
+val md_theme_dark_error = Color(0xFFFFB4AB)
+val md_theme_dark_errorContainer = Color(0xFF93000A)
+val md_theme_dark_onError = Color(0xFF690005)
+val md_theme_dark_onErrorContainer = Color(0xFFFFDAD6)
+val md_theme_dark_background = Color(0xFF1B1B1F)
+val md_theme_dark_onBackground = Color(0xFFE4E1E6)
+val md_theme_dark_surface = Color(0xFF1B1B1F)
+val md_theme_dark_onSurface = Color(0xFFE4E1E6)
+val md_theme_dark_surfaceVariant = Color(0xFF46464F)
+val md_theme_dark_onSurfaceVariant = Color(0xFFC7C5D0)
+val md_theme_dark_outline = Color(0xFF91909A)
+val md_theme_dark_inverseOnSurface = Color(0xFF1B1B1F)
+val md_theme_dark_inverseSurface = Color(0xFFE4E1E6)
+val md_theme_dark_inversePrimary = Color(0xFF3949E5)
+val md_theme_dark_shadow = Color(0xFF000000)
+val md_theme_dark_surfaceTint = Color(0xFFBDC2FF)
+val md_theme_dark_outlineVariant = Color(0xFF46464F)
+val md_theme_dark_scrim = Color(0xFF000000)
+
+
+val seed = Color(0xFF5565FF)
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Theme.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Theme.kt
index 5f9b63e..0dfe917 100644
--- a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Theme.kt
+++ b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Theme.kt
@@ -1,70 +1,99 @@
package indi.dmzz_yyhyy.lightnovelreader.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.dynamicDarkColorScheme
-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.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
+
+private val lightColors = lightColorScheme(
+ primary = md_theme_light_primary,
+ onPrimary = md_theme_light_onPrimary,
+ primaryContainer = md_theme_light_primaryContainer,
+ onPrimaryContainer = md_theme_light_onPrimaryContainer,
+ secondary = md_theme_light_secondary,
+ onSecondary = md_theme_light_onSecondary,
+ secondaryContainer = md_theme_light_secondaryContainer,
+ onSecondaryContainer = md_theme_light_onSecondaryContainer,
+ tertiary = md_theme_light_tertiary,
+ onTertiary = md_theme_light_onTertiary,
+ tertiaryContainer = md_theme_light_tertiaryContainer,
+ onTertiaryContainer = md_theme_light_onTertiaryContainer,
+ error = md_theme_light_error,
+ errorContainer = md_theme_light_errorContainer,
+ onError = md_theme_light_onError,
+ onErrorContainer = md_theme_light_onErrorContainer,
+ background = md_theme_light_background,
+ onBackground = md_theme_light_onBackground,
+ surface = md_theme_light_surface,
+ onSurface = md_theme_light_onSurface,
+ surfaceVariant = md_theme_light_surfaceVariant,
+ onSurfaceVariant = md_theme_light_onSurfaceVariant,
+ outline = md_theme_light_outline,
+ inverseOnSurface = md_theme_light_inverseOnSurface,
+ inverseSurface = md_theme_light_inverseSurface,
+ inversePrimary = md_theme_light_inversePrimary,
+ surfaceTint = md_theme_light_surfaceTint,
)
-private val LightColorScheme = lightColorScheme(
- primary = Purple40,
- secondary = PurpleGrey40,
- tertiary = Pink40
- /* Other default colors to override
- background = Color(0xFFFFFBFE),
- surface = Color(0xFFFFFBFE),
- onPrimary = Color.White,
- onSecondary = Color.White,
- onTertiary = Color.White,
- onBackground = Color(0xFF1C1B1F),
- onSurface = Color(0xFF1C1B1F),
- */
+private val darkColors = darkColorScheme(
+ primary = md_theme_dark_primary,
+ onPrimary = md_theme_dark_onPrimary,
+ primaryContainer = md_theme_dark_primaryContainer,
+ onPrimaryContainer = md_theme_dark_onPrimaryContainer,
+ secondary = md_theme_dark_secondary,
+ onSecondary = md_theme_dark_onSecondary,
+ secondaryContainer = md_theme_dark_secondaryContainer,
+ onSecondaryContainer = md_theme_dark_onSecondaryContainer,
+ tertiary = md_theme_dark_tertiary,
+ onTertiary = md_theme_dark_onTertiary,
+ tertiaryContainer = md_theme_dark_tertiaryContainer,
+ onTertiaryContainer = md_theme_dark_onTertiaryContainer,
+ error = md_theme_dark_error,
+ errorContainer = md_theme_dark_errorContainer,
+ onError = md_theme_dark_onError,
+ onErrorContainer = md_theme_dark_onErrorContainer,
+ background = md_theme_dark_background,
+ onBackground = md_theme_dark_onBackground,
+ surface = md_theme_dark_surface,
+ onSurface = md_theme_dark_onSurface,
+ surfaceVariant = md_theme_dark_surfaceVariant,
+ onSurfaceVariant = md_theme_dark_onSurfaceVariant,
+ outline = md_theme_dark_outline,
+ inverseOnSurface = md_theme_dark_inverseOnSurface,
+ inverseSurface = md_theme_dark_inverseSurface,
+ inversePrimary = md_theme_dark_inversePrimary,
+ surfaceTint = md_theme_dark_surfaceTint,
)
@Composable
-fun LightNovelReaderRefactoringTheme(
- darkTheme: Boolean = isSystemInDarkTheme(),
- // Dynamic color is available on Android 12+
- dynamicColor: Boolean = true,
- content: @Composable () -> Unit
+fun LightNovelReaderTheme(
+ useDarkTheme: Boolean = isSystemInDarkTheme(),
+ 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)
- }
-
- darkTheme -> DarkColorScheme
- else -> LightColorScheme
+ useDarkTheme -> darkColors
+ else -> lightColors
}
+
val view = LocalView.current
- if (!view.isInEditMode) {
- SideEffect {
- val window = (view.context as Activity).window
- window.statusBarColor = colorScheme.primary.toArgb()
- WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
- }
+ SideEffect {
+ val window = (view.context as Activity).window
+ window.statusBarColor = colorScheme.background.toArgb()
+ window.navigationBarColor = colorScheme.surface.toArgb()
+ WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !useDarkTheme
+ WindowCompat.getInsetsController(window, view).isAppearanceLightNavigationBars = !useDarkTheme
}
MaterialTheme(
colorScheme = colorScheme,
- typography = Typography,
content = content
)
}
\ No newline at end of file
diff --git a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Type.kt b/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Type.kt
deleted file mode 100644
index cb0cabd..0000000
--- a/app/src/main/java/indi/dmzz_yyhyy/lightnovelreader/ui/theme/Type.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-package indi.dmzz_yyhyy.lightnovelreader.ui.theme
-
-import androidx.compose.material3.Typography
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontFamily
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.sp
-
-// Set of Material typography styles to start with
-val Typography = Typography(
- bodyLarge = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 16.sp,
- lineHeight = 24.sp,
- letterSpacing = 0.5.sp
- )
- /* Other default text styles to override
- titleLarge = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Normal,
- fontSize = 22.sp,
- lineHeight = 28.sp,
- letterSpacing = 0.sp
- ),
- labelSmall = TextStyle(
- fontFamily = FontFamily.Default,
- fontWeight = FontWeight.Medium,
- fontSize = 11.sp,
- lineHeight = 16.sp,
- letterSpacing = 0.5.sp
- )
- */
-)
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index c1f900c..0000000
--- a/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml
deleted file mode 100644
index 218bbd5..0000000
--- a/app/src/main/res/drawable/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/icon_foreground.xml b/app/src/main/res/drawable/icon_foreground.xml
new file mode 100644
index 0000000..b2bce7d
--- /dev/null
+++ b/app/src/main/res/drawable/icon_foreground.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/icon_foreground_mono.xml b/app/src/main/res/drawable/icon_foreground_mono.xml
new file mode 100644
index 0000000..d69f3f4
--- /dev/null
+++ b/app/src/main/res/drawable/icon_foreground_mono.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 07d8e23..5620646 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,6 +1,6 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
deleted file mode 100644
index 07d8e23..0000000
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..5e3608c
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
deleted file mode 100644
index c209e78..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
deleted file mode 100644
index b2dfe3d..0000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..eace6a3
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
deleted file mode 100644
index 4f0f1d6..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
deleted file mode 100644
index 62b611d..0000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..94c9ce3
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
deleted file mode 100644
index 948a307..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
deleted file mode 100644
index 1b9a695..0000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..078f298
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
deleted file mode 100644
index 28d4b77..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9287f50..0000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..f70b670
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
deleted file mode 100644
index aa7d642..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
deleted file mode 100644
index 9126ae3..0000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 09837df..61a6f84 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,10 +1,61 @@
- #FFBB86FC
- #FF6200EE
- #FF3700B3
- #FF03DAC5
- #FF018786
- #FF000000
- #FFFFFFFF
+ #6750A4
+ #FFFFFF
+ #E9DDFF
+ #22005D
+ #625B71
+ #FFFFFF
+ #E8DEF8
+ #1E192B
+ #5954A8
+ #FFFFFF
+ #E3DFFF
+ #130463
+ #BA1A1A
+ #FFDAD6
+ #FFFFFF
+ #410002
+ #FFFBFF
+ #1C1B1E
+ #FFFBFF
+ #1C1B1E
+ #E7E0EB
+ #49454E
+ #7A757F
+ #F4EFF4
+ #313033
+ #CFBCFF
+ #000000
+ #6750A4
+ #CAC4CF
+ #000000
+
+ #CFBCFF
+ #381E72
+ #4F378A
+ #E9DDFF
+ #CBC2DB
+ #332D41
+ #4A4458
+ #E8DEF8
+ #C4C0FF
+ #2A2377
+ #413B8E
+ #E3DFFF
+ #FFB4AB
+ #93000A
+ #690005
+ #FFDAD6
+ #1C1B1E
+ #E6E1E6
+ #1C1B1E
+ #E6E1E6
+ #49454E
+ #CAC4CF
+ #948F99
+ #1C1B1E
+ #E6E1E6
+ #6750A4
+ #CFBCFF
\ No newline at end of file
diff --git a/app/src/main/res/values/launcher_icon_background.xml b/app/src/main/res/values/launcher_icon_background.xml
new file mode 100644
index 0000000..8e20a55
--- /dev/null
+++ b/app/src/main/res/values/launcher_icon_background.xml
@@ -0,0 +1,4 @@
+
+
+ #476FA8
+
\ No newline at end of file
diff --git a/app/src/main/res/values/splash.xml b/app/src/main/res/values/splash.xml
new file mode 100644
index 0000000..a7fba77
--- /dev/null
+++ b/app/src/main/res/values/splash.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index a82eb3d..8daf73d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,3 +1,3 @@
- LightNovelReaderRefactoring
+ LightNovelReader
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index 13988b6..6a98919 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -1,5 +1,4 @@
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml
index 7a180f4..75dd511 100644
--- a/app/src/main/res/xml/backup_rules.xml
+++ b/app/src/main/res/xml/backup_rules.xml
@@ -7,7 +7,7 @@
See https://developer.android.com/about/versions/12/backup-restore
-->
-
diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml
index 1736f46..fd9ee95 100644
--- a/app/src/main/res/xml/data_extraction_rules.xml
+++ b/app/src/main/res/xml/data_extraction_rules.xml
@@ -5,6 +5,16 @@
for details.
-->
-
-
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/filepaths.xml b/app/src/main/res/xml/filepaths.xml
new file mode 100644
index 0000000..6e9b7c4
--- /dev/null
+++ b/app/src/main/res/xml/filepaths.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/xml/network_security_config.xml b/app/src/main/res/xml/network_security_config.xml
new file mode 100644
index 0000000..f18e1f0
--- /dev/null
+++ b/app/src/main/res/xml/network_security_config.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index 8e8f4ab..1aecafe 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,5 +1,6 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id("com.android.application") version "8.2.0" apply false
- id("org.jetbrains.kotlin.android") version "1.9.0" apply false
+ id("com.android.application") version "8.5.1" apply false
+ id("com.android.library") version "8.5.1" apply false
+ id("org.jetbrains.kotlin.android") version "1.9.24" apply false
+ id("com.google.dagger.hilt.android") version "2.46" apply false
}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index de88276..7b3dd29 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sat Jul 13 22:56:00 GMT+08:00 2024
+#Sun Jul 14 23:29:35 GMT+08:00 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists