Add CreatePage with text input, dropdown, modal map, and location services; refactor MapPage and ContentScreen for MapViewModel injection
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package de.jadehs.strassenschadenpro2
|
||||
|
||||
import android.app.Application
|
||||
import android.util.Log
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
@@ -59,10 +58,10 @@ fun MainScreen(modifier: Modifier = Modifier, application: Application) {
|
||||
|
||||
@Composable
|
||||
fun ContentScreen(modifier: Modifier = Modifier, selectedIndex: Int, application: Application) {
|
||||
|
||||
val mapViewModel = remember { MapViewModel(application) }
|
||||
when(selectedIndex) {
|
||||
0 -> MapPage(application=application)
|
||||
1 -> CreatePage()
|
||||
0 -> MapPage(modifier = modifier, mapViewModel = mapViewModel)
|
||||
1 -> CreatePage(modifier = modifier, mapViewModel = mapViewModel)
|
||||
2 -> ListPage()
|
||||
3 -> SettingsPage()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user