Android-布局动画不会停留在顶部

Android-布局动画不会停留在顶部,android,android-animation,Android,Android Animation,我需要制作两个带有自定义动画的屏幕,如下所述: Screen 1 Screen 2 ----------------------------- ------------------------------ | | | | | | | |

我需要制作两个带有自定义动画的屏幕,如下所述:

Screen 1 Screen 2 ----------------------------- ------------------------------ | | | | | | | | | | | | | | | | | | | List 1 | List2 | ---------> | List 3 | List 4 | | (75% width) |(25% wid)| |(25%wid)| (75% width) | | | | | | | | | | | | | ----------------------------- ------------------------------ 我能够得到动画,但是包含列表1的screenOne_layoutOnelayout并没有保持在顶部。动画显示在列表2下面

有人能告诉我问题出在哪里吗


提前谢谢

对于那些感兴趣的人,我可以通过将两个屏幕的布局放在一个布局文件中并更改布局/视图的可见性来解决这个问题。使用的布局文件是

<LinearLayout android:id="@+id/featured_view_container"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:visibility="visible" >

    <ListView android:id = "@+id/featured_list"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="2" />

    <ImageView android:layout_height = "match_parent" 
        android:layout_width="wrap_content"
        android:src="@drawable/seperator"/>

    <LinearLayout android:id = "@+id/categories"
        android:orientation="vertical"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1" />

</LinearLayout>

<!-- Layout for the screen 2-->
<LinearLayout android:id="@+id/category_view_container"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:visibility="gone" >

    <LinearLayout android:id = "@+id/subcategories"
        android:orientation="vertical"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1" />

    <ImageView android:layout_height = "match_parent" 
        android:layout_width="wrap_content"
        android:src="@drawable/seperator"/>

    <ListView android:id = "@+id/subcategory_list"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="2" />

</LinearLayout>
<LinearLayout android:id="@+id/featured_view_container"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:visibility="visible" >

    <ListView android:id = "@+id/featured_list"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="2" />

    <ImageView android:layout_height = "match_parent" 
        android:layout_width="wrap_content"
        android:src="@drawable/seperator"/>

    <LinearLayout android:id = "@+id/categories"
        android:orientation="vertical"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1" />

</LinearLayout>

<!-- Layout for the screen 2-->
<LinearLayout android:id="@+id/category_view_container"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:visibility="gone" >

    <LinearLayout android:id = "@+id/subcategories"
        android:orientation="vertical"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1" />

    <ImageView android:layout_height = "match_parent" 
        android:layout_width="wrap_content"
        android:src="@drawable/seperator"/>

    <ListView android:id = "@+id/subcategory_list"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="2" />

</LinearLayout>
                    anim.setZAdjustment(Animation.ZORDER_TOP)