Skip to content

Releases: chenenyu/Router

v1.2.3

07 Jul 03:20
Compare
Choose a tag to compare

Supports default value for injected params.

@InjectParam支持字段的默认值

@InjectParam
String arg1 = "default";
@InjectParam
int arg2 = 123;

目前支持基本数据类型StringCharSequence,其他类型的默认值会被重置为null

v1.2.2

03 Jul 11:26
Compare
Choose a tag to compare

Fix interceptor bug.

v1.2.1

30 Jun 04:20
Compare
Choose a tag to compare
  1. Fix ClassCastException when injecting reference-type fields.
  2. Custom interceptor.

Router.handleTargetInterceptors(XXX);
Router.handleInterceptorTable(XXX);

v1.2.0

16 Jun 09:34
Compare
Choose a tag to compare

Important Release!

所有依赖的版本号都提升到 1.2.0,统一管理

  1. 支持kotlin-kapt
  2. 现在可以使用getIntent.getStringExtra(Router.RAW_URI)或者getArguments().getString(Router.RAW_URI)来获取原始的跳转路由
  3. 新注解@InjectParam,用来注解Activity/Fragment中的成员变量(结合4一起使用)
  4. 在Activity/Fragment中使用Router.injectParams(this)来自动注入被注解的变量,可参见Sample/app
  5. 优化编译期的gradle log提示
  6. 其他优化
@Route({"test", "http://example.com/test", "router://test"})
public class TestActivity extends AppCompatActivity {
    @InjectParam
    String id;
    @InjectParam(key = "status")
    private String sts;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);

        Router.injectParams(this);
    }
}

v1.1.1

17 May 07:29
Compare
Choose a tag to compare

router-gradle-plugin: 0.8.2
router: 1.1.1

重构接口RouteInterceptor中的方法参数,提供所有的options,方便使用。

Sorry for this breaking change.

v1.1.0

08 May 07:03
Compare
Choose a tag to compare

router-gradle-plugin: 0.8.0
router:1.1.0
router-compiler:0.6.0

EN:

  1. Compat for plugin 'android-apt'. (This plugin is deprecated.)
  2. Support fragment.

CN:

  1. 兼容‘android-apt’插件.(该插件已弃用)
  2. 支持注解fragment,用法见wiki和demo.

v1.0.4

25 Apr 08:57
Compare
Choose a tag to compare

rm support for Size/SizeF.

v1.0.3

24 Apr 03:06
Compare
Choose a tag to compare

Bug fix for methods with(...)

v1.0.2

19 Apr 08:38
Compare
Choose a tag to compare

EN:

  1. Deprecated method IRouter#extras.
  2. Add methods with(Bundle)、with(PersistableBundle)、with(String key, Object value).
  3. Overload api go(context), now you can call go(fragment) to startActivityForResult in your fragment.

CN:

  1. 弃用IRouter#extras
  2. 添加三个重载方法with(...)来操作bundle。
  3. 重载go(...),现在可已调用go(fragment)来跳转并在fragment接收result。

v1.0.1

06 Apr 06:50
Compare
Choose a tag to compare

router-gradle-plugin: v0.7.0

默认引用最新的routercompiler,取消对jack编译链的支持(google已放弃jack)。

router: v1.0.1

修复某些情况下callback不会调用的问题。