2

私は自分のレイアウトにslidingDrawerを実装しており、ハンドルにはImageViewを使用しています。

これですべて正常に動作しますが、ハンドル画像をクリックしても、引き出しが一度に開かない (または閉じる) 場合がよくあります。ハンドルを開閉するには、ハンドルに何度も触れなければなりません。

私はandroid:focusableandroid: focusableInTouchModeをslideDrawerとButton Imageの両方でfalseに設定してテストしようとしました。これは、親の一部が clid などをオーバーライドしているように見えます。

Button Image を ImageView に置き換えてみましたが、それでも同じ結果になりました。

ここで重要な何かが欠けている場合は、助けてください。

編集:以下は私のコードのスニペットです

    <SlidingDrawer
            android:id="@+id/drawer"
            android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:allowSingleTap="true"
    android:focusable="false"
    android:focusableInTouchMode="false"
    android:content="@+id/layout"
    android:handle="@+id/handle" >

    <ImageButton
        android:id="@+id/handle"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:clickable="false"
        android:focusable="false"
        android:focusableInTouchMode="false">
    </ImageButton>

ありがとう

4

0 に答える 0