简体   繁体   中英

How to make status bar scrollable and fit on top

How to make status bar scrollable and how to fit it at top?

I want to make scrollable status bar when I scroll it fits at top of the activity so please help me how to do the same thing.

any suggestion is welcome.

I want to make status bar scrollable like this :

在此处输入图片说明

When I scroll bottom it fits at top like this :

在此处输入图片说明

You need to wrap your Toolbar in AppBarLayout and use CoordinatorLayout like a parent. A good guide about this you can find here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM