sliding-panel

sliding-panel

项目地址:PierfrancescoSoffritti/sliding-panel 

简介:Android sliding panel that is part of the view hierarchy, not above it.

更多:作者   提 Bug   

标签:

 

Build Status core

share on twitter

A ViewGroup that implements a sliding panel that is part of the view hierarchy, not above it.

Difference from other libraries

All other implementations of the bottom sheet pattern and sliding panel patternimplement a panel that sits above all the other Views of the app. When the panel is collapsed (but visible) the only way to set its position is by using a peek factor (its distance from the bottom of the screen).

With this library the sliding panel is placed exactly where it is supposed to be in the view hierarchy, just like it would be in a vertical (or horizontal) LinearLayout. It doesn't sit above other Views.

Overview

SlidingPanel is a ViewGroup exending FrameLayout.

It has exacly two children: a non sliding view and a sliding view.

  • The non sliding view is just a view that doesn't move, positioned as if SlidingPanel was a LinearLayout.
  • The sliding view is a View that can be dragged by the user. It slides over the non sliding view, both vertically and horizontally.

The sliding view can be collapsed or expanded.

  • When collapsed, the sliding view is exactly where it would be if SlidingPanel was a LinearLayout.
  • When expanded, the sliding view is positioned to exactly cover the non sliding view. (Therefore the maximum amount of movement allowed to the sliding view is equal to the height (or width) of the non sliding view)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值