当从活动切换到活动时,底部工具栏看起来像移动

时间:2017-06-22 13:44:49

标签: android xml android-animation toolbar activity-transition

我想要有一个底部Toolbar。在具有以下相同代码的3个活动中

<android.support.v7.widget.Toolbar
    android:id="@+id/toolbar_bottom"
    android:layout_width="match_parent"
    android:layout_height="40dp"
    android:background="@android:color/white"
    android:layout_alignParentBottom="true"
    android:minHeight="?attr/actionBarSize" >
<LinearLayout
    android:id="@+id/toolbarmenucontainer"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >

    <ImageView
        android:id="@+id/home"
        android:layout_width="70dp"
        android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:src="@drawable/home"/>

    <ImageView
        android:id="@+id/news"
        android:layout_width="70dp"
        android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:src="@drawable/news"/>
    <ImageView
        android:id="@+id/upload"
        android:layout_width="70dp"
        android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:onClick="AddImage"
        android:src="@drawable/upload"/>
    <ImageView
        android:id="@+id/search"
        android:layout_width="70dp"
        android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:src="@drawable/search"/>
    <ImageView
        android:id="@+id/useraccount"
        android:layout_width="70dp"
        android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:src="@drawable/user"/>
</LinearLayout>

</android.support.v7.widget.Toolbar>

但是每当我从活动切换到另一个活动时,它就像它的移动一样。有没有更好的方法来获得底部Toolbar

0 个答案:

没有答案