android+跳跃的动画,查看跳跃和瞬间闪烁,虽然animateLayoutChanges = “真”

我正在使用的Android 我TabLayout动画:animateLayoutChanges =在AppBarLayout “真”。但是,当我设置TabLayout.setVisibility(View.GONE),我的片段的容器上升到ActionBar瞬间几毫秒。然后它返回到TabLayout的末尾,然后上升到ActionBar。我在下面的gif中解释了这一点。查看跳跃和瞬间闪烁,虽然animateLayoutChanges = “真”

3cK7p.gif

按钮理论和实践是背后的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支持库。

我该如何解决这个眨眼和跳跃?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值