When using the CoordinatorLayout my ScrollView has an incorrect size

前端 未结 2 2074
时光取名叫无心
时光取名叫无心 2020-12-15 02:41

I\'m using a ScrollView in a layout, and am attempting to use the new CoordinatorLayout from the design support library.

My layout file looks like this:

<         


        
2条回答
  •  臣服心动
    2020-12-15 03:35

    NestedScrollView is just like ScrollView, but it supports acting as both a nested scrolling parent and child on both new and old versions of Android. Nested scrolling is enabled by default.

    You can use a NestedScrollView within a parent ScrollView. NestedScrollView is used when there is a need for a scrolling view inside another scrolling view. This is where it is useful, when the system needs to decide which view to scroll.

    Here is an example of NestedScrollView with CoordinatorLayout:

     
    
         
    
             
    
         
    
         
    
             
    
             
    
         
    
     
    

提交回复
热议问题