Skip to content

Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.

fix(settings): adjust overlay position and padding for better feedback display

Durganshu Mishrae9446a1e0455
diff --git a/app/src/main/java/com/gotcha/ui/SettingsScreen.kt b/app/src/main/java/com/gotcha/ui/SettingsScreen.kt
index 8b86178..384e299 100644
--- a/app/src/main/java/com/gotcha/ui/SettingsScreen.kt
+++ b/app/src/main/java/com/gotcha/ui/SettingsScreen.kt
@@ -1142,14 +1142,14 @@ fun SettingsScreen(
)
}
- OverlayMessage(message = overlay, modifier = Modifier.align(Alignment.Center))
+ OverlayMessage(message = overlay, modifier = Modifier.align(Alignment.BottomCenter))
} // Box
}
}
/**
- * Centred, non-interactive toast-style overlay used for transient feedback
- * (e.g. connection test progress and result).
+ * Non-interactive toast-style overlay used for transient feedback
+ * (e.g. connection test progress and result). Anchored by the caller.
*/
@Composable
private fun OverlayMessage(message: SettingsOverlay?, modifier: Modifier = Modifier) {
@@ -1168,7 +1168,9 @@ private fun OverlayMessage(message: SettingsOverlay?, modifier: Modifier = Modif
contentColor = MaterialTheme.colorScheme.inverseOnSurface,
tonalElevation = 6.dp,
shadowElevation = 6.dp,
- modifier = Modifier.padding(32.dp).testTag("settings_overlay")
+ modifier = Modifier
+ .padding(horizontal = 24.dp, vertical = 32.dp)
+ .testTag("settings_overlay")
) {
Text(
text = lastText,