android slidingMenu 实现原理

     android slidingMenu 主要分为customViewAbove 和customViewBehind 也就是 menu view和 content  view。

    具体说,slidingMenu是个RelativeLayout,customViewAbove and customViewBehind are all child views.

customViewBehid is in behind ,and they all layout in matchparent when in initial state. This initila position 是他们的永久位置,任何点击的操作对应的位置,就是这个初始的位置。

 

    when 显示菜单的时候,就是要对customViewAbove and customViewBehind 做scrollto() action,   这个时候menu暴露出来 响应任何的点击事件,而customViewAbove postion in margin.

 

   使用scrollto   rather than change view layoutmargin or padding ,can increase performance.

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值