【发布时间】:2014-11-29 10:40:14
【问题描述】:
在这里,我使用的是上滑面板库。您可以在以下屏幕中看到面板和列表视图。如果我在面板外部单击(暗区),我想要做的是隐藏面板。相反,它是单击上述布局中的列表视图。我怎样才能做到这一点?
这里是 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>
我可以这样做吗?
【问题讨论】:
-
您好,我也遇到了同样的问题,如果您找到任何解决方案,请分享?
-
嗨 Rethinavel Pillai,我需要这种实现。你能分享一下这个实现的核心代码吗?
标签: android android-sliding slidingpanelayout