- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个关于 Umano AndroidSlidingUpPanel 的问题,我似乎没有找到解决方案。我想要两个 View ,一个在另一个之上,可以选择上下滚动,就像在 https://github.com/umano/AndroidSlidingUpPanel 的演示中一样。完美无缺。但是,我希望顶 View 在折叠时完全隐藏,就像 sothree:umanoPanelHeight="0dp"一样。这条线的问题是当高度为 0 时我无法到达面板。当您从左侧滑入菜单并从右侧滑回时,Google map 具有我想要的功能。
我的代码与演示中的代码非常相似,因此我认为没有必要在此处粘贴任何代码。我对解决此问题的其他选择持开放态度,但我需要向后兼容早期的 Android 版本。
感谢您对此的任何意见!
最佳答案
我想要一个类似的功能:我想将面板高度保持在 0 并在滑动时展开。
onTouchIntercepted
方法PanelState.EXPANDED
这是我从贡献者的 Github 页面获得的示例类:
public class SlidingAwareLinearLayout extends LinearLayout {
public SlidingAwareLinearLayout(final Context context) {
super(context);
}
public SlidingAwareLinearLayout(final Context context, final AttributeSet attrs) {
super(context, attrs);
}
public SlidingAwareLinearLayout(
final Context context, final AttributeSet attrs, final int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public SlidingAwareLinearLayout(
final Context context, final AttributeSet attrs, final int defStyleAttr,
final int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public boolean onInterceptTouchEvent(final MotionEvent ev) {
SlidingUpPanelLayout panel = (SlidingUpPanelLayout) getParent();
if (ev.getAction() == MotionEvent.ACTION_DOWN
&& panel.getPanelState() == SlidingUpPanelLayout.PanelState.ANCHORED) {
panel.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
return true;
}
return super.onInterceptTouchEvent(ev);
}
}
资源:https://github.com/umano/AndroidSlidingUpPanel/issues/476
关于android - Umano AndroidSlidingUpPanel 拖动高度为 0 的面板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40237732/
我正在探索 https://github.com/umano/AndroidSlidingUpPanel图书馆。当我滑动底部面板时,在幻灯片完成时它会获取完整的屏幕区域。 任何人都可以帮助我,如何将底
已解决: 显然源已更新以添加此功能。在那之前,我 fork 了源代码来做到这一点,并有一个标志来关闭方向变化。我的 fork 位于 github.com/Style87/AndroidSlidingU
我的应用有一个 map fragment 。在单击标记时,从底部到屏幕的一半会显示一个向上滑动的动画。然后再次点击标记向下滑动。 I want : Slide up menu should be cl
我正在使用 umano AndroidSlidingUpPanel在我的安卓项目中。在这里我使用谷歌地图作为我的主要内容。以下是相关的 XML 文件。
所以我开始使用 Umano 的 AndroidSlidingUpPanel 库,它非常有用。我设法从底部实现了一个滑动面板,效果很好。但是我想实现两个滑动面板(顶部和底部),如下所示: 这是我目前所拥
这个问题在这里已经有了答案: ListView inside ScrollView is not scrolling on Android (28 个答案) 关闭上个月。 我小时候有一个带有 Lis
我有一个关于 Umano AndroidSlidingUpPanel 的问题,我似乎没有找到解决方案。我想要两个 View ,一个在另一个之上,可以选择上下滚动,就像在 https://github.
我已经在我的应用程序中实现了 AndroidSlidingUpPanel 库,一切正常,但我希望滑动布局滑动直到它进入我的应用程序栏下方。 谢谢 Link to the Library 最佳答案 你可
我正在尝试使用 AndroidSlidingUpPanel library (在 Eclipse 中)我有这个错误: 04-19 20:09:48.413: E/AndroidRuntime(1376
我使用 Gradle 在 IntelliJ IDEA 上创建了一个项目,并尝试将 AndroidSlidingUpPanel 添加到其中( https://github.com/umano/Andro
我已经做了好几个小时了,但我仍然无法让 Umano 的向上滑动面板库在 android studio 中工作(https://github.com/umano/AndroidSlidingUpPane
我是一名优秀的程序员,十分优秀!