From 606dc0fd07359a9da31f90baabceb670bfcab000 Mon Sep 17 00:00:00 2001 From: geeksville Date: Tue, 7 Apr 2020 12:32:42 -0700 Subject: [PATCH] turn off gestures - they are confusing with the map view --- app/src/main/java/com/geeksville/mesh/MainActivity.kt | 2 ++ .../java/com/geeksville/mesh/service/RadioInterfaceService.kt | 2 +- app/src/main/res/layout/activity_main.xml | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/geeksville/mesh/MainActivity.kt b/app/src/main/java/com/geeksville/mesh/MainActivity.kt index 113b63d58..e64a7c2cf 100644 --- a/app/src/main/java/com/geeksville/mesh/MainActivity.kt +++ b/app/src/main/java/com/geeksville/mesh/MainActivity.kt @@ -301,6 +301,8 @@ class MainActivity : AppCompatActivity(), Logging, val tab_layout = findViewById(R.id.tab_layout) val pager = findViewById(R.id.pager) pager.adapter = tabsAdapter + pager.isUserInputEnabled = + false // Gestures for screen switching doesn't work so good with the map view TabLayoutMediator(tab_layout, pager) { tab, position -> // tab.text = tabInfos[position].text // I think it looks better with icons only tab.icon = getDrawable(tabInfos[position].icon) diff --git a/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt b/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt index c4d2ab131..e6dddbc4c 100644 --- a/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt @@ -316,7 +316,7 @@ class RadioInterfaceService : Service(), Logging { debug("requested MTU result=$mtuRes") mtuRes.getOrThrow() // FIXME - why sometimes is the result Unit!?! - fromNum = service.getCharacteristic(BTM_FROMNUM_CHARACTER) + fromNum = service.getCharacteristic(BTM_FROMNUM_CHARACTER)!! // We must set this to true before broadcasting connectionChanged isConnected = true diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index ae63bf094..c850876d6 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -30,9 +30,7 @@ Screen.settings -> SettingsContent() Screen.users -> UsersContent() Screen.channel -> ChannelContent(UIState.getChannel()) - Screen.map -> MapContent() --> - - /-- + Screen.map -> MapContent()