- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
在这里,我使用的是滑动面板库。您可以在以下屏幕中同时看到面板和 ListView 。我想做的是,如果我在面板外单击(昏暗区域),则隐藏面板。相反,它是点击上面布局中的 ListView 。我怎样才能做到这一点?
这是 XML,
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.voucher.point.activity"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<!-- sothree:dragView="@+id/dragView" -->
<com.sothree.slidinguppanel.SlidingUpPanelLayout
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom"
app:fadeColor="@color/transparent"
sothree:panelHeight="40dip"
sothree:paralaxOffset="200dp" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:orientation="vertical" >
<ListView
android:id="@+id/offersList"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="none"
android:visibility="gone" >
</ListView>
</LinearLayout>
<include
android:id="@+id/bottom_menu"
android:layout_width="fill_parent"
android:layout_height="270dip"
layout="@layout/side_menu" />
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
我可以这样做吗?
最佳答案
对于 3.3.0 及更高版本,可以通过以下方式执行此操作
final SlidingUpPanelLayout slidingUpPanelLayout = (SlidingUpPanelLayout) findViewById(R.id.sliding_layout);
slidingUpPanelLayout.setFadeOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
slidingUpPanelLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
}
});
关于android - 单击面板外部时如何隐藏 Umano SlidingupPanel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27201307/
我想使用 Umano/SlidingUpPanel在我的主要 Activity 中 这是我的activity_main.xml
我正在为我的应用程序使用 Umano SlidingUpPanel 库 ( https://github.com/umano/AndroidSlidingUpPanel ),它非常适合。然而,在滑动
AndroidSlidingUpPanel 在这里,我使用的是滑动面板库。您可以在以下屏幕中同时看到面板和 ListView 。我想做的是,如果我在面板外单击(昏暗区域),则隐藏面板。相反,它是点击上
在 slidingUpPanel 中,我有一个 ListView 小部件。当我尝试滚动时,ListView slidingUpPanel 关闭。如何在不关闭 slidingUpPanel 的情况下滚动
我正在使用 Umano Android SlidingUpPanel ( https://github.com/umano/AndroidSlidingUpPanel ),它按照我想要的方式工作,但是
我使用这个库,https://github.com/umano/AndroidSlidingUpPanel ,我在里面放了一个listview,但是不起作用,没有滚动,为什么?不仅是listview,
我使用 Umano 代码创建了一个滑动布局: https://github.com/umano/AndroidSlidingUpPanel 它工作得很好,但我有一个问题。我的面板应该是部分透明的,这样
我正在使用以下项目:https://github.com/umano/AndroidSlidingUpPanel 到目前为止它工作得很好,但我有一个问题:我想隐藏可滑动面板,直到我按下一个按钮,然后面
我在我的应用程序中使用 Umano/SlidingUpPanel 库,其中 map 是主要内容。一个面板在 map 上向上滑动。我将 overlay 属性设置为 false,因为我希望主要内容在面板向
这是package正在使用 ,当我在 panelBuilder 中使用 TextInput 时它同时具有 ListView 和 InputTextField,但是当我开始键入时,软键盘会覆盖 Inpu
这是package正在使用 ,当我在 panelBuilder 中使用 TextInput 时它同时具有 ListView 和 InputTextField,但是当我开始键入时,软键盘会覆盖 Inpu
我正在尝试使用 SlidingUpPanel来自 umano 并让 slider 成为 ViewPager。 但是,当试图左右滚动时,ViewPager 并没有移动。触摸事件似乎被 SlidingUp
我正在使用 umano's SlidingUpPanel library在我的项目中,但是当我尝试运行该应用程序时,出现了 InflateException。 android.view.Inflate
当我使用 SlidingUpPanelLayout 时,我必须设置两个子布局(主要和面板)。当第二个布局(面板)打开时,我想使用 Button 关闭它。但是我找不到方法。 方法是什么? 最佳答案 最后
我正在使用 SlidingUpPanel library在我的一个 Media Player 应用程序中。 在滑动面板中,我有媒体控件,我想在顶部显示轨道的插图。我遇到的问题是我希望媒体控件始终位于屏
我创建了一个 SlidingUpPanel它由顶部布局中的谷歌地图和底部面板中的 ListView 组成。布局也有一个 anchor 。我遇到的问题是,很多时候当我将面板从 anchor 滑动到折叠状
我的应用程序中需要一个向上滑动面板,并在 GitHub 上找到了这个来自 Umando 应用程序的免费资源。 GitHub Sliding Up Paned Umano 但是因为我是 Android
我正在使用 umano AndroidSlidingUpPanel 的这个库它工作正常,只是有一个问题我无法解决。主要的 child 是一个工作正常的 mapview(静态主视图),第二个 child
嘿,我使用向上滑动面板,它是 GitHub 上 Umano 应用程序的开源项目。我在我的应用程序中实现了它并且它正在运行。 -> 当您单击面板或在其上拖动时,它会向上滑动。 但我希望它在我单击特定按钮
我是一名优秀的程序员,十分优秀!