C
cederick
Neues Mitglied
- 0
also ich habe einen ViewFlipper:
Das erste Layout ist ein Menü das zweite Layout wird gezeigt während ich meine Surfaceview initialisiere.
Im FrameLayout adde ich meine SurfaceView, das problem ist wenn die activity pausiert wird während die Surfacethread angezeigt wird und ausgeführt wird. Dann wird beim fortsetzen trotz vf.setDisplayedChild(1); die Surfaceview angezeit. die Frage(n) ist/sind warum ist das so und wie kann ich es ändern?
Code:
<ViewFlipper
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainActivity"
android:id="@+id/main_vf"
android:layout_height="720px"
android:layout_width="1280px"
android:layout_gravity="center_horizontal|bottom"
android:inAnimation="@anim/fade_in_vf"
android:outAnimation="@anim/fade_out_vf"><!-- else view would disappear -->
<include layout="@layout/menu_start"/>
<include layout="@layout/loading_screen"/>
<FrameLayout
android:id="@+id/end_of_vf"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:layout_gravity="center_horizontal|bottom">
</FrameLayout>
</ViewFlipper>
Im FrameLayout adde ich meine SurfaceView, das problem ist wenn die activity pausiert wird während die Surfacethread angezeigt wird und ausgeführt wird. Dann wird beim fortsetzen trotz vf.setDisplayedChild(1); die Surfaceview angezeit. die Frage(n) ist/sind warum ist das so und wie kann ich es ändern?