Modify code to correctly handle screen rotation and other changes.

*** ** * ** ***

    This Kotlin file below contains logic for displaying data on a tablet screen.
    Add or modify the code to correctly handle configuration changes (e.g., screen rotation).
    Preserve the current state of the UI and avoid data loss during configuration changes.
    Ensure the layout adapts appropriately to different orientations.

    $CURRENT_FILE

| To run this prompt in Android Studio, click**Gemini** in the sidebar and paste it in the chat field.  
| To save and retrieve prompts in the Studio IDE, go to**Settings \> Gemini \> Prompt Library**.

*** ** * ** ***