mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-24 08:43:27 -04:00
begin adding map view
This commit is contained in:
@@ -6,6 +6,7 @@ import com.geeksville.android.GeeksvilleApplication
|
||||
import com.geeksville.android.Logging
|
||||
import com.geeksville.util.Exceptions
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import com.mapbox.mapboxsdk.Mapbox
|
||||
|
||||
|
||||
class MeshUtilApplication : GeeksvilleApplication(null, "58e72ccc361883ea502510baa46580e3") {
|
||||
@@ -26,5 +27,8 @@ class MeshUtilApplication : GeeksvilleApplication(null, "58e72ccc361883ea502510b
|
||||
crashlytics.recordException(exception)
|
||||
}
|
||||
}
|
||||
|
||||
// Mapbox Access token
|
||||
Mapbox.getInstance(this, getString(R.string.mapbox_access_token))
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,7 @@ fun AppDrawer(
|
||||
|
||||
ScreenButton(Screen.messages)
|
||||
ScreenButton(Screen.users)
|
||||
ScreenButton(Screen.map)
|
||||
ScreenButton(Screen.channel)
|
||||
ScreenButton(Screen.settings)
|
||||
}
|
||||
|
||||
33
app/src/main/java/com/geeksville/mesh/ui/Map.kt
Normal file
33
app/src/main/java/com/geeksville/mesh/ui/Map.kt
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.geeksville.mesh.ui
|
||||
|
||||
import androidx.compose.Composable
|
||||
import androidx.ui.core.ContextAmbient
|
||||
import androidx.ui.layout.Column
|
||||
import androidx.ui.layout.LayoutPadding
|
||||
import androidx.ui.layout.LayoutSize
|
||||
import androidx.ui.material.MaterialTheme
|
||||
import androidx.ui.tooling.preview.Preview
|
||||
import androidx.ui.unit.dp
|
||||
|
||||
|
||||
@Composable
|
||||
fun MapContent() {
|
||||
analyticsScreen(name = "channel")
|
||||
|
||||
val typography = MaterialTheme.typography()
|
||||
val context = ContextAmbient.current
|
||||
|
||||
Column(modifier = LayoutSize.Fill + LayoutPadding(16.dp)) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun previewMap() {
|
||||
// another bug? It seems modaldrawerlayout not yet supported in preview
|
||||
MaterialTheme(colors = palette) {
|
||||
MapContent()
|
||||
}
|
||||
}
|
||||
@@ -146,6 +146,7 @@ private fun AppContent(openDrawer: () -> Unit) {
|
||||
Screen.settings -> SettingsContent()
|
||||
Screen.users -> HomeContent()
|
||||
Screen.channel -> ChannelContent()
|
||||
Screen.map -> MapContent()
|
||||
else -> TODO()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ object Screen {
|
||||
val channel = ScreenInfo(R.drawable.ic_twotone_contactless_24, "Channel")
|
||||
val users = ScreenInfo(R.drawable.ic_twotone_people_24, "Users")
|
||||
val messages = ScreenInfo(R.drawable.ic_twotone_message_24, "Messages")
|
||||
val map = ScreenInfo(R.drawable.ic_twotone_map_24, "Map")
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user