edge-to-edge
Was er macht
Dieser Skill migriert eine Jetpack-Compose-App auf die randlose Darstellung. Er behebt Schaltflächen und Listen, die hinter der Navigations- oder Statusleiste verborgen sind, sowie Überlappungen mit der Tastatur. Er ist für Android-Entwickler gedacht, deren Bildschirme das ganze Display sauber nutzen sollen.
Wann du ihn nutzt
- ✓Wenn Schaltflächen oder Listen in deiner Compose-App hinter der Navigationsleiste oder Statusleiste liegen.
- ✓Wenn die Tastatur ein Textfeld in deinem Compose-Bildschirm verdeckt.
- ✓Wenn Text in der Statusleiste oder Navigationsleiste auf deinen Bildschirmen schwer lesbar ist.
Link zum Skill
https://github.com/android/skills/blob/main/system/edge-to-edge/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Die unteren Schaltflächen meiner Compose-App liegen hinter der Navigationsleiste. Mach die App randlos und behebe das.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill findet zuerst jede Activity und jede Liste, die randlose Unterstützung braucht. Danach aktiviert er die randlose Darstellung in jeder Activity, legt den Tastatur-Modus für die Größenanpassung fest und wendet die Systemabstände an, damit wichtige Inhalte antippbar bleiben.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Prerequisites
- Project MUST use Android Jetpack Compose.
- Project MUST target SDK 35 or later. If the SDK is lower than 35, increase the SDK to 35.
Step 1: plan
- Locate and analyze all Activity classes to detect which have existing edge-to-edge support. For every Activity without edge-to-edge, plan to make each Activity edge-to-edge.
- In each Activity, Locate and analyze all lists and FAB components to detect which have existing edge-to-edge support. For every component without edge-to-edge support, plan to make each of these components edge-to-edge.
- In each Activity, scan for
TextField,OutlinedTextField, orBasicTextField. If found, then you MUST verify the IME doesn't hide the input field by following the IME section of this skill.
Step 2: add edge-to-edge support
- Add
enableEdgeToEdgebeforesetContentinonCreatein each Activity that does not already callenableEdgeToEdge. - Add
android:windowSoftInputMode="adjustResize"in the AndroidManifest.xml for all Activities that use a soft keyboard.
Step 3: apply insets
The app MUST apply system insets, or align content to rulers, so critical UI remains tappable. Choose only one method to avoid double padding:
- PREFERRED: When available, use
Scaffolds and passPaddingValuesto the content lambda.
<br />Scaffold { innerPadding -> // innerPadding accounts for system bars and any Scaffold components LazyColumn( modifier = Modifier .fillMaxSize() .consumeWindowInsets(innerPadding), contentPadding = innerPadding ) { /* Content */ } }PREFERRED: When available, use the automatic inset handling or padding modifiers in material components.
- Material 3 Components manages safe areas for its own components, including:
TopAppBarSmallTopAppBarCenterAlignedTopAppBarMediumTopAppBarLargeTopAppBarBottomAppBarModalDrawerSheetDismissibleDrawerSheetPermanentDrawerSheetModalBottomSheetNavigationBarNavigationRail
- For Material 2 Components, use the
windowInsetsparameter to apply insets manually forBottomAppBar,TopAppBarandBottomNavigation. DO NOT apply padding to the parent container; instead, pass insets directly to the App Bar component. Applying padding to the parent container prevents the App Bar background from drawing into the system bar area. For example, forTopAppBar, choose only one of the following options:- PREFERRED:
TopAppBar(windowInsets = AppBarDefaults.topAppBarWindowInsets) TopAppBar(windowInsets = WindowInsets.systemBars.exclude(WindowInsets.navigationBars))TopAppBar(windowInsets = WindowInsets.systemBars.add(WindowInsets.captionBar))
- PREFERRED:
- Material 3 Components manages safe areas for its own components, including:
For components outside a Scaffold, use padding modifiers, such as
Modifier.safeDrawingPadding()orModifier.windowInsetsPadding(WindowInsets.safeDrawing).
<br />Box( modifier = Modifier .fillMaxSize() .safeDrawingPadding() ) { Button( onClick = {}, modifier = Modifier.align(Alignment.BottomCenter) ) { Text("Login") } }For deeply nested components with excessive padding, use
WindowInsetsRulers(e.g.Modifier.fitInside(WindowInsetsRulers.SafeDrawing.current)). See the IME section for a code sample.When you need an element (e.g. a custom header or decorative scrim) to equal the dimensions of a system bar, use inset size modifiers (e.g.
Modifier.windowInsetsTopHeight(WindowInsets.systemBars)). See the Lists section for a code sample.
- PREFERRED: When available, use
Adaptive Scaffolds
NavigationSuiteScaffoldmanages safe areas for its own components, like theNavigationRailorNavigationBar. However, the adaptive scaffolds (e.g.NavigationSuiteScaffold,ListDetailPaneScaffold) don't propagate PaddingValues to their inner contents. You MUST apply insets to individual screens or components (e.g., listcontentPaddingor FAB padding) as described in Step 3 . DO NOT applysafeDrawingPaddingor similar modifiers to theNavigationSuiteScaffoldparent. This clips and prevents an edge-to-edge screen.
IME
- For each Activity with a soft keyboard, check that `andr
Häufige Fragen
Welches Android-Ziel braucht die App?
Die App muss SDK 35 oder neuer als Ziel haben. Liegt sie darunter, erhöht der Skill es auf 35.
Fügt er Abstände doppelt hinzu?
Der Skill ist so gebaut, dass er die Abstände mit einer Methode anwendet, um doppelte Abstände zu vermeiden.
Deckt er Android-Apps mit Views ab?
Nein. Die App muss Jetpack Compose verwenden.
Details
Originalbeschreibung des Autors
Use this skill to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues. Use this skill to fix UI components (like buttons or lists) that are obscured by or overlapping with the navigation bar or status bar, fix IME insets, and fix system bar legibility.
repo: android/skills
Beliebtheit
- GitHub-Sterne
- 10k
- Platz im Ranking
- #11934
- Lizenz
- Apache-2.0
- Aktualisiert
- 29.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
agp-9-upgrade
10kHilft deinem Agenten, eine Android-App auf Android Gradle Plugin 9 zu aktualisieren und die Breaking Changes abzuarbeiten. Nicht für Multiplattform-Projekte.
camerax
10kHilft deinem Agenten, Kamerafunktionen für Android mit CameraX zu bauen, einschließlich Videoaufnahme, Hardwaresteuerung, ML Kit und Media3-Effekten.
android-for-cars-parked-apps
10kHilft deinem Agenten, eine Android-Video-, Spiele- oder Browser-App so anzupassen, dass sie als geparkte App in Android Auto und Android Automotive läuft.
appfunctions
10kHilft deinem Agenten, in einer Android-App wichtige Abläufe zu finden und sie als AppFunctions bereitzustellen, die KI-Agenten und Sprachbefehle ausführen können.
Ähnliche Skills
android-clean-architecture
280kLässt deinen Agenten Android-Projekte effizient strukturieren. Der Code wird so organisiert, dass Wartung und neue Features leichter werden.
compose-multiplatform-patterns
280kHilft deinem Agenten, Compose Multiplatform und Jetpack Compose Patterns in KMP-Projekten einzusetzen. Abgedeckt sind State, Navigation, Theming und Performance.
dart-flutter-patterns
280kLässt deinen Agenten Code für Dart- und Flutter-Apps schreiben. Er nutzt moderne Patterns für robuste und gut wartbare Apps.