【发布时间】:2012-07-26 09:47:26
【问题描述】:
我正在使用slidingdrawer,并且能够在我的应用程序中的所有活动上显示slidingdrawer。
我面临的问题是我仍然可以点击背景(活动中的视图)。有没有办法在滑动抽屉打开时禁用背景。
问候
编辑 1
<?xml version="1.0" encoding="utf-8"?>
<SlidingDrawer xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/slidingDrawer1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:content="@+id/content"
android:handle="@+id/handle" >
<Button
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Handle" />
<LinearLayout
android:id="@+id/content"
style="@style/roundrectbox_white_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/slider_round_rect_border"
android:orientation="vertical"
android:padding="15dp" >
<ListView
android:id="@+id/listView1"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:cacheColorHint="@android:color/transparent"
android:divider="@android:color/transparent"
android:listSelector="@android:color/transparent" />
</LinearLayout>
</SlidingDrawer>
【问题讨论】:
-
你添加了什么作为滑动抽屉的内容??
-
拖动滑动抽屉时能看到listview吗??
-
我的滑动抽屉工作得很好,我可以在向上拖动它时看到列表视图。问题是滑动抽屉没有覆盖我的整个内容视图,我仍然可以点击/点击我不想要的后台活动。我想禁用它。我希望我很清楚。
-
你可以发布你的xml文件吗??
-
这样做你将无法触摸背景内容。
标签: android slidingdrawer