Commit fc3b7e84 authored by Yacumima's avatar Yacumima

对example做简单兼容

parent 833d1995
...@@ -16,13 +16,13 @@ public class PageRouter { ...@@ -16,13 +16,13 @@ public class PageRouter {
public static boolean openPageByUrl(Context context, String url, int requestCode) { public static boolean openPageByUrl(Context context, String url, int requestCode) {
try { try {
if (TextUtils.equals(url, FLUTTER_PAGE_URL)) { if (url.startsWith(FLUTTER_PAGE_URL)) {
context.startActivity(new Intent(context, FlutterPageActivity.class)); context.startActivity(new Intent(context, FlutterPageActivity.class));
return true; return true;
} else if (TextUtils.equals(url, FLUTTER_FRAGMENT_PAGE_URL)) { } else if (url.startsWith(FLUTTER_FRAGMENT_PAGE_URL)) {
context.startActivity(new Intent(context, FlutterFragmentPageActivity.class)); context.startActivity(new Intent(context, FlutterFragmentPageActivity.class));
return true; return true;
} else if (TextUtils.equals(url, NATIVE_PAGE_URL)) { } else if (url.startsWith(NATIVE_PAGE_URL)) {
context.startActivity(new Intent(context, NativePageActivity.class)); context.startActivity(new Intent(context, NativePageActivity.class));
return true; return true;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment