Barrierefreiheit und Edge-to-Edge-UI
Unterstützen Sie TalkBack, große Schriftarten und Insets.
Barrierefreiheit und Edge-to-Edge-UI ist eine kostenlose Jetpack Compose Academy-Lektion auf CoddyKit. Dies ist Lektion 1 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Jetpack Compose Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Jetpack Compose Academy-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
Polish Before You Ship
A great app is for everyone. Before release, you make it usable with screen readers, large fonts, and modern full-screen layouts.
What TalkBack Needs
Android has a screen reader called TalkBack. It speaks the UI aloud, so every meaningful element must carry a clear label it can announce.
contentDescription for Icons
Icons and images show no text, so TalkBack reads their contentDescription. Give each one a short, meaningful phrase that says what it does.
Icon(
Icons.Default.Share,
contentDescription = "Share post"
)Hide Decoration from Readers
Purely decorative images add noise when spoken. Set contentDescription to null so TalkBack skips them and focuses on what matters.
Image(
painter = bg,
contentDescription = null
)Respect Larger Fonts
Users can scale system text up. Size text in sp, not fixed dp, so your labels grow with the accessibility settings instead of clipping.
Text("Welcome", fontSize = 16.sp)Touch Targets Stay Tappable
Small buttons are hard to hit. Aim for a 48dp minimum touch target so every control is comfortable for fingers and assistive switches.
Modifier.size(48.dp)Going Edge-to-Edge
Modern apps draw behind the status and navigation bars. Call enableEdgeToEdge in your Activity to let content fill the entire screen.
enableEdgeToEdge()
setContent { App() }Avoid Hiding Behind System Bars
Once edge-to-edge, content can slip under system bars. WindowInsets tell you exactly how much space those bars occupy so you can pad around them.
Quick Check
You add a share icon button. What lets TalkBack announce its purpose?
Apply Insets the Easy Way
The simplest fix is a safeDrawing inset modifier. It pads your content away from the cutouts and bars without any manual math.
Modifier.windowInsetsPadding(
WindowInsets.safeDrawing
)Test Accessibility Early
Turn on TalkBack and the Accessibility Scanner on a device. They surface missing labels and low contrast before a reviewer or user finds them.
Group Related Content
Scattered labels are tiring to hear. Use mergeDescendants in semantics so a card reads as one unit, giving TalkBack users a smoother pass.
Modifier.semantics(
mergeDescendants = true
) {}Recap: Accessible and Immersive
You labeled icons, scaled text in sp, kept targets at 48dp, and went edge-to-edge with insets. Now your app welcomes every user.
Lerne Kotlin mit einem KI-Tutor — kostenlos
Schreibe und führe echten Code in deinem Browser aus, bekomme sofortige Hilfe von einem 24/7 KI-Tutor und setze dein Lernen im Web oder in der App fort.
- Kurse
- 30
- Lektionen
- 120
Häufig gestellte Fragen
Ist die Lektion „Barrierefreiheit und Edge-to-Edge-UI“ kostenlos?
Ja — der vollständige Text von „Barrierefreiheit und Edge-to-Edge-UI“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Jetpack Compose Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Jetpack Compose Academy-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Barrierefreiheit und Edge-to-Edge-UI“?
Unterstützen Sie TalkBack, große Schriftarten und Insets. Du übst Jetpack Compose Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Jetpack Compose Academy zu starten?
Keine Vorkenntnisse erforderlich. Jetpack Compose Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 1 von 4.
Wie lange dauert die Lektion „Barrierefreiheit und Edge-to-Edge-UI“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Jetpack Compose Academy-Lektion Code schreiben und ausführen?
Ja. Jede Jetpack Compose Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Barrierefreiheit und Edge-to-Edge-UI
- Baseline Profiles für schnellen Start
- Signiertes Release-App-Bundle
- Compose-fähige Multiplattform-Architektur