feat(android): init basic maps
This commit is contained in:
parent
aebc802b88
commit
89ffc02e1d
8 changed files with 36 additions and 17 deletions
|
|
@ -3,9 +3,12 @@ package moe.lava.banksia
|
|||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.material.BottomSheetScaffold
|
||||
import androidx.compose.material.Button
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Scaffold
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
|
|
@ -15,23 +18,14 @@ import org.jetbrains.compose.ui.tooling.preview.Preview
|
|||
|
||||
import banksia.composeapp.generated.resources.Res
|
||||
import banksia.composeapp.generated.resources.compose_multiplatform
|
||||
import moe.lava.banksia.native.maps.Maps
|
||||
|
||||
@Composable
|
||||
@Preview
|
||||
fun App() {
|
||||
MaterialTheme {
|
||||
var showContent by remember { mutableStateOf(false) }
|
||||
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Button(onClick = { showContent = !showContent }) {
|
||||
Text("Click me!")
|
||||
}
|
||||
AnimatedVisibility(showContent) {
|
||||
val greeting = remember { Greeting().greet() }
|
||||
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Image(painterResource(Res.drawable.compose_multiplatform), null)
|
||||
Text("Compose: $greeting")
|
||||
}
|
||||
}
|
||||
Scaffold {
|
||||
Maps(modifier = Modifier.fillMaxSize())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,6 @@ data class Marker(val name: String)
|
|||
|
||||
@Composable
|
||||
expect fun Maps(
|
||||
modifier: Modifier,
|
||||
markers: List<Marker>
|
||||
modifier: Modifier = Modifier,
|
||||
markers: List<Marker> = listOf()
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue