简体   繁体   中英

Are there other app:layout_behavior predefined values?

In design support lib post I saw app:layout_behavior="@string/appbar_scrolling_view_behavior" .

It makes AppBarLayout not overlap the contents from under it. Even though there is no such line in my string.xml .

Are there any other predefined behaviors and when is it put to string file?

The behavior is defined in another file that does not directly belong to your project and apparently, there are not other default layout_behavior .

You can see that the final used string is this one:

<string name="appbar_scrolling_view_behavior" translatable="false">com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior</string>

If you would like to inspect the file, mine was located under the following path (MacOS):

/Users/{username}/.gradle/caches/transforms-1/files-1.1/material-1.1.0-alpha02.aar/903dc3574983c63db2914223f13b7f8e⁩/res/values/values.xml

Note that 903dc3574983c63db2914223f13b7f8e might be different in your case

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