0
我似乎对普通视图和SurfaceView没有任何好运。我有一个有两个孩子的FrameLayout,一个glSurfaceView和一个ViewAnimator。目的是通过顶部的按钮进行背景渲染以获得菜单,选项等。当我使用ViewAnimator进行动画制作时,它们会按照它们的动作进行动画,但似乎它们会在某种情况下滚动,就好像它们被部分遮罩一样(蒙版区域似乎与视图大小有关)。如果我删除了glSurfaceView,它的行为就会正确(即使SurfaceView中的onDraw除glClear之外什么都不做)。我正要放弃,完全采取另一种方法,但我想我是问有没有人遇到过这种情况。在SurfaceView上使用ViewAnimator导致问题
主XML
<FrameLayout android:id="@+id/FrameLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<include android:id="@+id/glrender" layout="@layout/glview" />
<include android:id="@+id/guiscreens" layout="@layout/viewflipper" />
</FrameLayout>
总帐视图
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<android.opengl.GLSurfaceView
android:id="@+id/glsurfaceview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</FrameLayout>
视图动画
<ViewAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/flipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<include android:id="@+id/first" layout="@layout/mainmenu" />
<include android:id="@+id/second" layout="@layout/otherscreen" />
</ViewAnimator>
的视图之一
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:id="@+id/Button01"
android:text="CLICK ME"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</Button>
</LinearLayout>
我通过文档阅读,我认为我已经修好了一切,但我想我错过了一些东西。在演示中我找不到任何样品,完全符合我的要求。我感谢任何意见,谢谢!
嗯,再次感谢,我猜想我现在可以放弃这个想法:) – Handsome 2010-10-19 02:26:49
我们知道什么时候/如果这个问题得到解决吗? – stfn 2012-10-10 16:29:14
现在,SurfaceViews支持动画吗? – PacificSky 2013-03-27 18:30:32