Android 滑动抽屉动画不是';看不见
我在Android 滑动抽屉动画不是';看不见,android,surfaceview,slidingdrawer,glsurfaceview,Android,Surfaceview,Slidingdrawer,Glsurfaceview,我在滑动抽屉动画方面有一些问题。 我有一个视图 activity_main.xml 问题是,在单击抽屉的句柄图像后,它会消失片刻(动画运行时),然后以打开状态出现。为什么会这样 <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal"
滑动抽屉
动画方面有一些问题。
我有一个视图
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>
...
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));
...