mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
back to making maps work?
This commit is contained in:
parent
40853723ab
commit
d9ef6815ec
5 changed files with 26 additions and 4 deletions
|
|
@ -1,12 +1,18 @@
|
|||
package com.geeksville.mesh.ui
|
||||
|
||||
import androidx.compose.Composable
|
||||
import androidx.ui.androidview.AndroidView
|
||||
import androidx.ui.core.ContextAmbient
|
||||
import androidx.ui.core.Text
|
||||
import androidx.ui.fakeandroidview.AndroidView
|
||||
import androidx.ui.layout.Column
|
||||
import androidx.ui.material.MaterialTheme
|
||||
import androidx.ui.tooling.preview.Preview
|
||||
import com.geeksville.android.Logging
|
||||
import com.geeksville.mesh.R
|
||||
import com.geeksville.mesh.model.UIState
|
||||
import com.mapbox.mapboxsdk.maps.MapView
|
||||
|
||||
object mapLog : Logging
|
||||
|
||||
@Composable
|
||||
fun MapContent() {
|
||||
|
|
@ -15,7 +21,15 @@ fun MapContent() {
|
|||
val typography = MaterialTheme.typography()
|
||||
val context = ContextAmbient.current
|
||||
|
||||
AndroidView(R.layout.map_view) {
|
||||
Column {
|
||||
Text("hi")
|
||||
AndroidView(R.layout.map_view) { view ->
|
||||
view as MapView
|
||||
view.onCreate(UIState.savedInstanceState)
|
||||
view.getMapAsync {
|
||||
mapLog.info("In getmap")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue