我正在使用的Android 我TabLayout动画:animateLayoutChanges =在AppBarLayout “真”。但是,当我设置TabLayout.setVisibility(View.GONE),我的片段的容器上升到ActionBar瞬间几毫秒。然后它返回到TabLayout的末尾,然后上升到ActionBar。我在下面的gif中解释了这一点。查看跳跃和瞬间闪烁,虽然animateLayoutChanges = “真”
按钮理论和实践是背后的TabLayout由于某种原因,但是当隐藏TabLayout动画开始FrameContainer持有我的观点棍棒TabLayout的底部。
我记录了一个视频,该视频演示了这种行为。 Dropbox视频播放器跳过一些帧和动画看起来不错。这就是为什么要注意到这个错误,你可以在电脑上加载视频,并以高质量观看5秒和11秒。 Video
我LayoutXML:
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_width="0px"
android:layout_height="0px"/>
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true">
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:visibility="gone"
app:tabGravity="fill"
app:tabIndicatorColor="@android:color/white"
app:tabMode="fixed"/>
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/outer_background">
android:id="@+id/main_load_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true"/>
android:id="@+id/left_drawer_full"
layout="@layout/navigation_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"/>
另外我使用23.2.1支持库。
我该如何解决这个眨眼和跳跃?