我一直在遇到Android的SlidingDrawer的一些问题。我正在建造一个水平滑动抽屉的屏幕。它工作正常,它按预期开启和关闭。我已将bottomOffset设置为50dip,以便在抽屉关闭时看到50dpi的内容,但这种情况没有发生。Android:SlidingDrawer与bottomOffset和内容可见
当抽屉关闭时,我看到屏幕右侧与手柄之间的距离为50dip,但内容视图不可见,因此手柄和屏幕边缘之间存在50dip的黑色空间,因为下面显示的图像:
当我按下手柄按钮,似乎内容获取其可视性变得可见,然后appers。我想保持的内容可见,而不必按手柄,就像下面的IMAGEM:
我下载了SlidingDrawer源代码http://blog.sephiroth.it/2011/03/29/widget-slidingdrawer-top-to-bottom/为了尝试改变代码,并得到预期的结果,但我没有得到。
的滑动抽屉的XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<br.com.dina.partial.example.MultiDirectionSlidingDrawer
xmlns:my="http://schemas.android.com/apk/res/br.com.dina.partial.example"
android:id="@+id/map_slider"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
my:handle="@+id/Handle"
my:content="@+id/ViewLayout"
my:direction="rightToLeft"
my:bottomOffset="-65dip"
android:layout_below="@+id/test">
<Button android:id="@+id/Handle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="handle"/>
<LinearLayout android:id="@+id/ViewLayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.markupartist.android.widget.ActionBar
android:id="@+id/actionbar"
style="@style/ActionBar"/>
<FrameLayout android:id="@+id/ViewContent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white" />
</LinearLayout>
</br.com.dina.partial.example.MultiDirectionSlidingDrawer>
</RelativeLayout>
有没有一种方法可以达到我想要什么?
非常感谢
编辑添加XML
你能张贴SlidingDrawer的XML? – koopaking3 2012-02-20 17:18:33