私はAndroidのSlidingDrawerに問題が発生しています。私は水平スライド式引き出しでスクリーンを構築しています。それは正常に動作しています、それは期待どおりに開閉しています。私は引き出しが閉じられたときにコンテンツの50dpiを見るためにbottomOffsetを50dipに設定しましたが、これは起こっていません。Android:SlidingDrawer bottomOffsetとコンテンツを表示
引き出しを閉じると、画面の右側とハンドルの間の50dipの距離がハンドルに表示されますが、コンテンツビューは表示されなくなるため、ハンドルと画面のエッジの間に50dpiの黒いスペースがあります。ショー下の画像:私はハンドルのボタンを押すと
、コンテンツがその可視性が可視に変更されます、そしてそれがappersようです。
私は、コードを変更しようとするために、http://blog.sephiroth.it/2011/03/29/widget-slidingdrawer-top-to-bottom/からSlidingDrawerのソースコードをダウンロードし、期待を取得:以下IMAGEMにように私は、ハンドルを押すことなく、目に見えるコンテンツを維持したいと思います結果、しかし私は取得していません。
スライディング引き出しのための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>
は、私が欲しいものを達成する方法はありますか?
感謝
は引き出しの状態に応じて特定のアイテムの可視性を変更するonDrawerScrollListener
、onDrawerOpenListener
、およびonDrawerCloseListener
を使用するXML
をしたあなたはSlidingDrawerのXMLを投稿してもらえますか? – koopaking3