I changed the version of the support library from 25 to 26, the behavior of the toolbar changed. This repository has reproduced samples.
Issue : https://issuetracker.google.com/issues/67624932
branch:version25 Expected
- compileSdkVersion 25
- buildToolsVersion "25.0.2"
- targetSdkVersion 25
- SupportLibrary 25.3.1
- Android Studio 2.3.3
- behavior movie [https://github.com/tatsuhama/ToolbarBehaviorChange/blob/version25/25.gif]
branch:version26 UnExpected
- compileSdkVersion 26
- buildToolsVersion "26.0.2"
- targetSdkVersion 25
- SupportLibrary 26.1.0
- Android Studio 3.0.0-beta7
- behavior movie [https://github.com/tatsuhama/ToolbarBehaviorChange/blob/version26/26.gif]