kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
begin adding map view
rodzic
fb2304ba82
commit
9be189f89c
5
TODO.md
5
TODO.md
|
@ -1,7 +1,9 @@
|
|||
# High priority
|
||||
Work items for soon alpha builds
|
||||
|
||||
* update play store listing for public beta
|
||||
* let channel be editited
|
||||
* make link sharing work
|
||||
* finish map view
|
||||
* run services in sim mode on emulator
|
||||
* show offline nodes as greyed out
|
||||
* show time since last contact on the node info card
|
||||
|
@ -161,3 +163,4 @@ Don't leave device discoverable. Don't let unpaired users do things with device
|
|||
* generate real channel QR codes
|
||||
* Have play store entry ask users to report if their android version is too old to allow install
|
||||
* use git submodule for androidlib
|
||||
* update play store listing for public beta
|
|
@ -87,6 +87,9 @@ dependencies {
|
|||
//implementation 'com.google.protobuf:protobuf-java:3.11.1'
|
||||
//implementation 'com.google.protobuf:protobuf-java-util:3.11.1'
|
||||
implementation 'com.google.protobuf:protobuf-javalite:3.11.1'
|
||||
|
||||
// mapbox
|
||||
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.0.0'
|
||||
|
||||
// You also need to include the following Compose toolkit dependencies.
|
||||
implementation("androidx.compose:compose-runtime:$compose_version")
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M5,18.31l3,-1.16L8,5.45L5,6.46zM16,18.55l3,-1.01L19,5.69l-3,1.17z"
|
||||
android:strokeAlpha="0.3"
|
||||
android:fillAlpha="0.3"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20.5,3l-0.16,0.03L15,5.1 9,3 3.36,4.9c-0.21,0.07 -0.36,0.25 -0.36,0.48L3,20.5c0,0.28 0.22,0.5 0.5,0.5l0.16,-0.03L9,18.9l6,2.1 5.64,-1.9c0.21,-0.07 0.36,-0.25 0.36,-0.48L21,3.5c0,-0.28 -0.22,-0.5 -0.5,-0.5zM8,17.15l-3,1.16L5,6.46l3,-1.01v11.7zM14,18.53l-4,-1.4L10,5.47l4,1.4v11.66zM19,17.54l-3,1.01L16,6.86l3,-1.16v11.84z"/>
|
||||
</vector>
|
|
@ -0,0 +1 @@
|
|||
../../../../../../mapbox-token.xml
|
|
@ -1 +1 @@
|
|||
Subproject commit ee0863c3c94856f9859d17219761903f4dea00fd
|
||||
Subproject commit 188cf4fbb503ac0384f1fce4d3d3f0c2c9f07c02
|
Ładowanie…
Reference in New Issue