Coordinatorlayout adjustresize not working

前端 未结 9 588
傲寒
傲寒 2020-12-08 15:32

MY CODE (and more): I have a Coordinator Layout as follows



        
9条回答
  •  春和景丽
    2020-12-08 15:51

    My Layout

    
    
        
    
            
    
                
    
                
    
            
    
        
    
        
    
        
    
    
    

    I had the exact same problem. I figured out, that if i use something within the e.g. NestedScrollView or within a FrameLayout i would assume as well that handles the Scroll itself, the CoordinatorLayout does not adjustResize / behave the way you want. The adjustResize|adjustPan settings within the Manifest are ignored.

    For me this was very hard to figure out, because i wrote a few (combined-) Views myself that contained RelativeLayout or ScrollViews and such.

    If i just avoid using RelativeLayouts or anything else than NestedScrollView to handle the view scrolling, it behaves the way, at least i wanted it to.

    But i think, there is a Bug within CoordinatorLayout or a behaviour we all need to understand better to avoid this type of problems...

    Maybe this is useful to know for someone...

    My Settings are:

    • support/design/appcompat : 22.2.1
    • no need for layout_gravity

提交回复
热议问题