Skip to content

Debloat your Android TV, install apps, browse and transfer files on it, all from your phone. Just 3 MB, no tracking, no root, no PC.

Show the Remote FAB on Overview only

jesse-agent-2327d6f87ad98f0
diff --git a/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt b/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt
index fee4385..e253168 100644
--- a/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt
+++ b/app/src/main/java/app/tellyscope/ui/DeviceTabs.kt
@@ -54,7 +54,6 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.ShortNavigationBar
import androidx.compose.material3.ShortNavigationBarItem
-import androidx.compose.material3.SmallFloatingActionButton
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Surface
@@ -205,19 +204,13 @@ fun DeviceTabsScreen(
Box {
Scaffold(
snackbarHost = { SnackbarHost(snackbar) },
- // Each tab's main action as Material's extended FAB: install on Apps, upload on Files, the Remote
- // elsewhere. Where a tab has its own, the Remote stacks above it as a small FAB.
+ // Each tab's main action as Material's extended FAB: the Remote on Overview, install on Apps, upload on Files.
floatingActionButton = {
- if (!offline) Column(horizontalAlignment = Alignment.End, verticalArrangement = Arrangement.spacedBy(16.dp)) {
- when (tab) {
- TvTab.Apps, TvTab.Files -> SmallFloatingActionButton(onClick = actions.remote) { Icon(TileIcons.Remote, contentDescription = "Remote") }
- else -> ExtendedFloatingActionButton(onClick = actions.remote, icon = { Icon(TileIcons.Remote, null) }, text = { Text("Remote") })
- }
- when (tab) {
- TvTab.Apps -> ExtendedFloatingActionButton(onClick = actions.pickApp, icon = { Icon(Icons.Default.Add, null) }, text = { Text("Install app") })
- TvTab.Files -> ExtendedFloatingActionButton(onClick = { actions.pickFile(ui.files.folder) }, icon = { Icon(TileIcons.Upload, null) }, text = { Text("Upload files") })
- else -> {}
- }
+ if (!offline) when (tab) {
+ TvTab.Overview -> ExtendedFloatingActionButton(onClick = actions.remote, icon = { Icon(TileIcons.Remote, null) }, text = { Text("Remote") })
+ TvTab.Apps -> ExtendedFloatingActionButton(onClick = actions.pickApp, icon = { Icon(Icons.Default.Add, null) }, text = { Text("Install app") })
+ TvTab.Files -> ExtendedFloatingActionButton(onClick = { actions.pickFile(ui.files.folder) }, icon = { Icon(TileIcons.Upload, null) }, text = { Text("Upload files") })
+ else -> {}
}
},
topBar = {
@@ -255,8 +248,7 @@ fun DeviceTabsScreen(
Modifier.fillMaxSize().padding(pad),
state = list,
// No top padding: the Apps tabs pin at the list's top edge, flush under the bar; the hero carries the 4dp.
- // The bottom keeps the last row clear of the FABs: two of them stacked on Apps and Files.
- contentPadding = PaddingValues(start = 16.dp, end = 16.dp, bottom = if (!offline && (tab == TvTab.Apps || tab == TvTab.Files)) 152.dp else 96.dp),
+ contentPadding = PaddingValues(start = 16.dp, end = 16.dp, bottom = 96.dp),
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
val snap = ui.snapshot
diff --git a/app/src/test/java/app/tellyscope/ScreenshotTest.kt b/app/src/test/java/app/tellyscope/ScreenshotTest.kt
index 94257fc..d8e21e1 100644
--- a/app/src/test/java/app/tellyscope/ScreenshotTest.kt
+++ b/app/src/test/java/app/tellyscope/ScreenshotTest.kt
@@ -465,10 +465,6 @@ class ScreenshotTest {
@Test fun tabs_files() = tabShots(TvTab.Files, "42_tabs_files")
@Test fun tabs_tweaks() = tabShots(TvTab.Tweaks, "43_tabs_tweaks")
@Test fun tabs_overview_dark() = shot("40_tabs_overview", dark = true) { DeviceTabsScreen(tabsState(), DeviceActions(), startTab = TvTab.Overview) }
- // The last app row clears the Remote and Install FABs stacked over the list's end.
- @Test fun tabs_apps_end() = shot("41_tabs_apps_end", before = { compose.onNode(hasScrollAction()).performScrollToKey("tail"); compose.mainClock.advanceTimeBy(1_000) }) {
- DeviceTabsScreen(tabsState(), DeviceActions(), startTab = TvTab.Apps)
- }
@Test fun tabs_apps_dark() = shot("41_tabs_apps", dark = true) { DeviceTabsScreen(tabsState(), DeviceActions(), startTab = TvTab.Apps) }
@Test fun tabs_files_dark() = shot("42_tabs_files", dark = true) { DeviceTabsScreen(tabsState(), DeviceActions(), startTab = TvTab.Files) }
@Test fun tabs_tweaks_dark() = shot("43_tabs_tweaks", dark = true) { DeviceTabsScreen(tabsState(), DeviceActions(), startTab = TvTab.Tweaks) }