Ga naar hoofdinhoud
Logo Appt Light

Succescriterium 1.3.4 - Niveau AA

Weergavestand

Zorg dat de inhoud van het scherm meedraait met de weergave van het toestel. Alle schermen van een app moeten in alle oriëntaties zijn te gebruiken. Gebruikers in een rolstoel hebben hun toestel soms in een vaste weergave gemonteerd. In de liggende weergave passen er meer woorden op het scherm, handig voor gebruikers die hun letters hebben vergroot.

Impact

  • Dit is belangrijk voor onder meer gebruikers die hun scherm horizontaal op een rolstoel hebben gemonteerd en deze niet kunnen draaien.

  • 1 op de 3 mensen maakt gebruik van vergroot lettertype. Horizontale weergave is bij een groot lettertype erg fijn in gebruik.

Controleren

Draait de inhoud van het scherm mee als je je toestel draait?”

Dit kan visueel getest worden, er zijn geen hulpmiddelen nodig.

Oplossing

Sta meerdere scherm oriëntaties toe

On Android, make sure that the android:screenOrientation attribute is not used anywhere.

Open Android Studio and press the Shift key twice to open the search dialog. Search for “android:screenOrientation”. In case there are search results, remove the attribute.

You probably need to make additional code adjustments to make sure the all orientations are working as intended.

To listen to orientation changes, add android:configChanges="orientation" to your manifest. Then, override the onConfigurationChanged to receive configuration notifications. Use the orientation property of the Configuration object to check the new orientation.

override fun onConfigurationChanged(newConfig: Configuration) {
    super.onConfigurationChanged(newConfig)

    when (newConfig.orientation) {
        Configuration.ORIENTATION_PORTRAIT -> {
            // Portrait logic
        }
        Configuration.ORIENTATION_LANDSCAPE -> {
            // Landscape logic
        }
        else -> {
            // Ignored
        }
    }
}
Bijdragen

Bronnen

Feedback?

Laat 't ons weten!