You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've refactored the app bar and status bar to improve the UI and enable an edge-to-edge display.
This update addresses several UI requirements:
1. **Enabled Edge-to-Edge Display:** The application now draws content under the system status bar for a more immersive experience. I achieved this by making changes in `MainActivity`.
2. **Transparent Status Bar:** The status bar is now transparent, allowing your app's background color to show through. System UI icons (time, battery, etc.) will automatically adjust their color (light/dark) based on your app's theme. I implemented this using Accompanist SystemUiController.
3. **Animated App Title in `MenuScreen`:**
- I created a new `SharedTopAppBar` composable, which features an animated app title ("Screen Operator").
- When you open the app or display the `MenuScreen`, each letter of the app name animates (fades in and slides up) with a slight stagger.
- Each letter is rendered in a distinct dark color, ensuring good contrast against both light and dark theme backgrounds.
- `MenuScreen` now uses `Scaffold` to host this `SharedTopAppBar`.
4. **`PhotoReasoningScreen` Adjustments:**
- This screen does not display the app bar or app name, as you requested.
- Its content is correctly padded to account for the status bar, ensuring no overlap while maintaining the edge-to-edge feel.
5. **General Code Structure:**
- I created new composables `AnimatedAppTitle.kt` and `SharedTopAppBar.kt` in the `common.ui` package for better organization.
- I updated padding and layout structures in `MenuScreen.kt` and `PhotoReasoningScreen.kt` to support the new UI.
- I ensured Composable Previews are wrapped in your app theme for consistency.
These changes provide a more modern and visually appealing interface, adhering to Material Design principles for app bars and system UI integration.
(This fixes a previous attempt that failed due to compilation errors.)
Toast.makeText(context, "Please subscribe to the app to continue.", Toast.LENGTH_LONG).show()
202
+
} else {
203
+
onItemClicked(menuItem.routeId)
204
+
}
205
+
},
206
+
enabled =!isTrialExpired, // Disable button if trial is expired
207
+
modifier =Modifier.align(Alignment.End)
244
208
) {
245
-
Text(text ="Pro (2,90 €/Month)")
209
+
Text(text =stringResource(R.string.action_try))
246
210
}
247
211
}
248
212
}
249
213
}
250
-
}
251
214
252
-
item {
253
-
Card(
254
-
modifier =Modifier
255
-
.fillMaxWidth()
256
-
.padding(horizontal =16.dp)
257
-
) {
258
-
val annotatedText = buildAnnotatedString {
259
-
append("Screenshots are saved in Pictures/Screenshots and you should delete them afterwards. Google has discontinued free API access to Gemini 2.5 Pro without a deposited billing account. There are rate limits for free use of Gemini models. The less powerful the models are, the more you can use them. The limits range from a maximum of 10 to 30 calls per minute. After each screenshot (every 2-3 seconds) the LLM must respond again. More information is available at ")
annotatedText.getStringAnnotations(tag ="URL", start = offset, end = offset)
282
-
.firstOrNull()?.let { annotation ->
283
-
uriHandler.openUri(annotation.item)
284
-
}
256
+
.padding(horizontal =16.dp)
257
+
) {
258
+
val annotatedText = buildAnnotatedString {
259
+
append("Screenshots are saved in Pictures/Screenshots and you should delete them afterwards. Google has discontinued free API access to Gemini 2.5 Pro without a deposited billing account. There are rate limits for free use of Gemini models. The less powerful the models are, the more you can use them. The limits range from a maximum of 10 to 30 calls per minute. After each screenshot (every 2-3 seconds) the LLM must respond again. More information is available at ")
0 commit comments