DEV Community

Cover image for How to manage scroll state in a bottom tab in Jetpack compose
Raksha for Canopas Software

Posted on

1

How to manage scroll state in a bottom tab in Jetpack compose

Learn how to save and restore the state of composable while navigating between two composable by bottom tabs.

In this video, we used saveState & restoreState to handle the state.

.

With the help of saveState flag we can save the state of our composable and by using restoreState we can restore the state when we swap between bottom navigation items.

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay