こんにちは、みんな、
カスタム SurfaceView で SlidingDrawer を使用していて、問題が発生しました。問題は、SlidingDrawer のハンドルが上下にドラッグされているときに、SurfaceView が残りのビュー領域を認識しないことです。
ハンドルの現在の高さに基づいて SurfaceView の高さのベースを設定する方法はありますか?
レイアウト XML:
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<and.dev.test.CustomSurfaceView android:id="@+id/flock"
android:layout_width="fill_parent" android:layout_height="fill_parent" />
<SlidingDrawer android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@+id/drawer"
android:handle="@+id/handle" android:content="@+id/content"
android:layout_gravity="fill">
<LinearLayout android:id="@id/handle"
android:orientation="horizontal" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:gravity="center_horizontal"
android:background="#FFFFFFFF">
<TextView android:background="@drawable/bird_blue"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout android:id="@id/content"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
</SlidingDrawer> </FrameLayout>