Android SlidingDrawer from top?

前端 未结 4 1463
野性不改
野性不改 2020-11-27 03:38

Is there any way to make the drawer slide from top to bottom?

4条回答
  •  心在旅途
    2020-11-27 04:24

    I've found a simple way to do that. All you have to do is to set the rotation of 180º for the slidingDrawer, the content and the handle. It's easier to understand with an example, so look what I've done:

    First, I'll show you my old SlidingDrawer, from bottom to top.

    
        
        
    
    

    Now look at the changes I made, setting the rotation of 180º

    
        
            
        
        
    
    

    Note that I also created a LinearLayout to set as handle, and didn't change it's rotation, but I changed the rotation of it's child. This was to prevent a small issue I had, but everything is working fine and it's simple.

提交回复
热议问题