Initial v0.1.1 scaffold
- Multi-module Android project: app/ (entry point), composeApp/ (UI),
core/domain/ (pure-Kotlin interfaces), core/data/ (ObjectBox-backed
repository).
- Privacy-first: no INTERNET permission, no analytics, auto-backup
disabled (data_extraction_rules.xml excludes all domains).
- AGPL-3.0 licensed with full LICENSE + NOTICE files.
- Material 3 UI with dynamic color on Android 12+, dark/light theme
follows system.
- v0.1.1 polish:
* Editor text field shrinks above the soft keyboard (Scaffold
contentWindowInsets union(systemBars, ime) + windowSoftInputMode
adjustResize).
* List cards now render title (first non-empty line, titleMedium)
plus abbreviated body preview (max 2 lines, ellipsised). Empty
notes display as 'Untitled'.
* versionCode 1 -> 2, versionName 0.1.0 -> 0.1.1.
This commit is contained in:
commit
1477e2426d
44 files changed
+2880
No files matched your search
@@ -0,0 +1,49 @@
|
||||
package org.incido.compose
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.navigation.NavType
|
||||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import androidx.navigation.navArgument
|
||||
import org.incido.compose.ui.editor.NoteEditorScreen
|
||||
import org.incido.compose.ui.notelist.NoteListScreen
|
||||
import org.incido.compose.ui.theme.IncidoTheme
|
||||
|
||||
/** Top-level navigation destinations. */
|
||||
private object Routes {
|
||||
const val LIST = "list"
|
||||
const val EDITOR = "editor/{noteId}"
|
||||
fun editor(noteId: Long?): String =
|
||||
"editor/${noteId ?: -1L}"
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun IncidoApp() {
|
||||
IncidoTheme {
|
||||
val navController = rememberNavController()
|
||||
NavHost(navController = navController, startDestination = Routes.LIST) {
|
||||
composable(Routes.LIST) {
|
||||
NoteListScreen(
|
||||
onOpenEditor = { id -> navController.navigate(Routes.editor(id)) },
|
||||
)
|
||||
}
|
||||
composable(
|
||||
route = Routes.EDITOR,
|
||||
arguments = listOf(
|
||||
navArgument("noteId") {
|
||||
type = NavType.LongType
|
||||
defaultValue = -1L
|
||||
},
|
||||
),
|
||||
) { entry ->
|
||||
val raw = entry.arguments?.getLong("noteId") ?: -1L
|
||||
val id = if (raw <= 0L) null else raw
|
||||
NoteEditorScreen(
|
||||
noteId = id,
|
||||
onClose = { navController.popBackStack() },
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user