首页 > 学院 > 开发设计 > 正文

small框架sample中的几个跳转api

2019-11-09 18:44:19
字体:
来源:转载
供稿:网友
Small.openUri("main", LaunchActivity.this);//对应app.main中的MainActivity Small.openUri("https://github.com/wequick/Small/issues", MainActivity.this);//跳转到webView//创建远程fragmentPRivate static String[] sUris = new String[] {"home", "mine", "stub"}; Fragment fragment = Small.createObject("fragment-v4", sUris[position], MainActivity.this);Small.openUri("detail?from=app.home", getContext());//传参key:from values:app.homeSmall.openUri("detail/sub", getContext());//指定打开subActivity//取出参数 Uri uri = Small.getUri(this); if (uri != null) { String from = uri.getQueryParameter("from"); if (from != null) { TextView tvFrom = (TextView) findViewById(R.id.tvFrom); tvFrom.setText("-- Greet from " + from); } }
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表