SlidingDrawer
アニメーションに問題があります。私はView
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<RelativeLayout
android:id="@+id/rlGL"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</RelativeLayout>
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:topOffset="900dp"
android:content="@+id/content"
android:handle="@+id/handle"
android:orientation="horizontal"
android:animateLayoutChanges="false">
<ImageView
android:id="@+id/handle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/add" />
<LinearLayout
android:id="@+id/content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:measureWithLargestChild="true"
android:orientation="vertical"
android:background="#171717">
<Button
android:id="@+id/bOk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ok"
android:textSize="48sp">
</Button>
</LinearLayout>
</SlidingDrawer>
</FrameLayout>
この「空」は、 (カメラ プレビュー用) および(透明な背景を持つ OpenGL シーン用)RelativeLayout
に使用します。コードがあります:SurfaceView
GLSurfaceView
MainActivity.java
...
setContentView(R.layout.activity_main);
relLayout = (RelativeLayout) findViewById(R.id.rlGL);
mGLSurfaceView = new MyGlSurfaceView(this);
mGLSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
relLayout.addView(mGLSurfaceView, new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));
preview = new SurfaceView(this);
surfaceHolder = preview.getHolder();
surfaceHolder.addCallback(this);
relLayout.addView(preview, new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));
...
問題は、ドロワーのハンドル イメージをクリックした後、(アニメーションの実行中に) 一瞬非表示になり、開いた状態で表示されることです。なぜそれが起こるのですか?