Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 用两个框架布局替换一个框架布局的动画_Android_Android Animation_Android Framelayout - Fatal编程技术网

Android 用两个框架布局替换一个框架布局的动画

Android 用两个框架布局替换一个框架布局的动画,android,android-animation,android-framelayout,Android,Android Animation,Android Framelayout,我有三个框架布局,如下面的代码所示。最初,只显示一个框架布局,单击其中的一个项目后,它应该退出“向下滑动”,另外两个框架布局应该从屏幕底部向上滑动 我们都会用另一个框架布局替换一个框架布局,但这听起来有点微不足道 请帮助,如何实现这一点连同动画(幻灯片向上和向下)。 我谈论的是带有ID的框架布局:primaryMenu、secondaryMenu和tertiaryMenu activity_main.xml: <RelativeLayout xmlns:android="http:

我有三个框架布局,如下面的代码所示。最初,只显示一个框架布局,单击其中的一个项目后,它应该退出“向下滑动”,另外两个框架布局应该从屏幕底部向上滑动

我们都会用另一个框架布局替换一个框架布局,但这听起来有点微不足道

请帮助,如何实现这一点连同动画(幻灯片向上和向下)。 我谈论的是带有ID的框架布局:primaryMenu、secondaryMenu和tertiaryMenu

activity_main.xml:

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:id="@+id/parentLayout"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:background="@color/primaryDark"
android:orientation="vertical">


<FrameLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_above="@+id/control_area"
    android:layout_below="@+id/button_container"
    android:background="@color/primaryDark">

    <org.ArtIQ.rex.editor.view.imagezoom.ImageViewTouch
        android:id="@+id/main_image"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center" />

    <org.ArtIQ.rex.editor.view.StickerView
        android:id="@+id/sticker_panel"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center"
        android:visibility="gone" />

    <org.ArtIQ.rex.editor.view.CropImageView
        android:id="@+id/crop_panel"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center"
        android:visibility="gone" />

    <org.ArtIQ.rex.editor.view.RotateImageView
        android:id="@+id/rotate_panel"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center"
        android:visibility="gone" />

    <org.ArtIQ.rex.editor.view.TextStickerView
        android:id="@+id/text_sticker_panel"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center"
        android:visibility="gone" />

    <org.ArtIQ.rex.editor.view.CustomPaintView
        android:id="@+id/custom_paint_view"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center"
        android:visibility="gone" />
</FrameLayout>


<LinearLayout
    android:layout_marginTop="@dimen/margin_3"
    android:id="@+id/control_area"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/tertiaryMenu"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />

    <FrameLayout
        android:id="@+id/secondaryMenu"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />

    <FrameLayout
        android:id="@+id/primaryMenu"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />



</LinearLayout>


你应该在你的主要活动中处理它,这就是我要问的……在主要活动中如何处理?你的根布局是什么?我将尝试为此创建一个测试项目。我想我知道怎么做,给我10-20分钟。