GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Home

Home

Jump to bottom
YoKey edited this page Mar 7, 2018 · 38 revisions

Fragmentation在使用过程中有问题?

欢迎发邮件或者提issue。

新版本1.3有什么重要变化?

1、特性

  • 新增startWithPopTo()方法,(替代popTo(fg,boolean,runnable()-> start())新方法动画更自然,popTo()依然保留)

  • 增强出栈方法(pop()/popTo())的健壮性

2、优化

  • 对于start(),添加简单的防抖动机制

新版本1.2有什么重要变化?

1、特性

  • 新增队列机制,彻底解决Fragment多点触控、极端事务问题,提高稳定性 ( 同时新增post(Runnable)方法,可以让你的自定义任务入队)

  • 彻底解决after onSaveInstanceState()异常: 现在再也不会抛出该异常了

2、优化

  • 优化startForResult(),现在不管任何情况都可以准确回调 调用方
  • 现在默认显示 栈视图悬浮球

3、Fix

  • #683: startForResultDontHideSelf() not working

新版本1.1有什么重要变化?

1、特性

  • ExtraTransaction添加setCustomAnimations(),支持Animator(需要support-26.0.0+),更自由控制转场动画! 用法介绍见这里

  • ExtraTransaction添加startDontHideSelf(),即start()时,不hide自身Fragment

  • onSupportVisible()等生命周期调用顺序规范化:onActivityCreated() -> onResume() -> onSupportVisible -> onLazyInitView() => onSupportInvisible() -> onPause()

2、Fix

  • Fix 在SupportFragment中同时start多个Fragments时,onHiddenChanged()不回调问题 #473

  • 兼容support-27.0.+

新版本1.0有什么重要变化?

1、特性

  • 不需要强制继承SupportActivity/SupportFragment了,可以通过implements ISupportActivity/Fragment + Delegate形式自己实现自定义SupportActivity/Fragment (可拷贝SupportActivity/Fragment到自己的Support里)

  • 可以通过setFragmentAnimator()动态改变Fragment的动画了

  • 支持popTo()下的动画

  • 更好的支持处理自定义tag、添加SharedElements、不加入回退栈情况下的相关事务

  • 进一步兼容多点触控、高频事务,优化过度绘制问题

2、移除

  • 移除库中的FragmentLifecycleCallbacks(自support-25.1.0开始,官方新增了FragmentLifecycleCallbacks)

  • 移除replaceLoadRootFragment(),统一使用loadRootFragment()

3、新增

  • 新增SupportHelper类,该类可以帮助获取栈内Fragment的相关信息等等

  • 增加extraTransaction()处理自定义tag、添加SharedElements、不加入回退栈的相关事务(替代原transaction())

  • 新增setFragmentAnimator()动态改变Fragment动画

  • 新增loadRootFragment(containerId, fragment, addToBack, allowEnterAnim),addToback指定是否加入回退栈(默认true),allowEnterAnim指定是否允许入场动画(默认false)

  • 新增popTo(f, includeF, afterRunnable, popAnim), popAnim:指定出栈时的动画

4、Fix:

  • 通过replaceFragment()加载的Fragment生命周期可以正确触发了

历史版本介绍看这里

Using Fragmentation

  • Home
  • Getting Started
  • API
  • How To Use
    • onSupportVisible()等
    • 懒加载、优化Animation性能
    • 使用场景- 转场动画
    • 使用场景- Back键的事件传递机制
    • 使用场景- startForResult&启动模式
    • 使用场景- loadMultiRootFragment的使用 & ViewPager
  • ChangeLog

Clone this wiki locally

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.