完成下载按钮支持打开 H5 页面 https://gitlab.ghzs.com/pm/halo-app-issues/issues/727
This commit is contained in:
@ -125,7 +125,7 @@ public class WebActivity extends NormalActivity {
|
||||
url = String.format(Locale.CHINA, "%s?user_id=%s&name=%s&icon=%s×tamp=%d", url, userId, name, URLEncoder.encode(icon), Math.round(new Date().getTime() / 1000));
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(EntranceUtils.KEY_URL, url);
|
||||
bundle.putBoolean(WebFragment.KEY_IS_BADGE_CENTER, true);
|
||||
bundle.putBoolean(WebFragment.KEY_LEAVE_WEB_PAGE_TO_HANDLE_TITLE, true);
|
||||
|
||||
return getTargetIntent(context, WebActivity.class, WebFragment.class, bundle);
|
||||
}
|
||||
@ -154,9 +154,29 @@ public class WebActivity extends NormalActivity {
|
||||
public static Intent getIntentByUrl(Context context, String url) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(EntranceUtils.KEY_URL, url);
|
||||
return getIntentByUrl(context, url, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static Intent getIntentByUrl(Context context, String url, boolean leaveWebPageHandleTitle) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(EntranceUtils.KEY_URL, url);
|
||||
bundle.putBoolean(WebFragment.KEY_LEAVE_WEB_PAGE_TO_HANDLE_TITLE, leaveWebPageHandleTitle);
|
||||
return getTargetIntent(context, WebActivity.class, WebFragment.class, bundle);
|
||||
}
|
||||
|
||||
|
||||
public static Intent getIntentForWebGame(Context context, String url, String gameName, boolean disableWebviewBackStack) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(EntranceUtils.KEY_URL, url);
|
||||
bundle.putString(WebFragment.KEY_GAME_NAME, gameName);
|
||||
bundle.putBoolean(WebFragment.KEY_LEAVE_WEB_PAGE_TO_HANDLE_TITLE, true);
|
||||
if (disableWebviewBackStack) {
|
||||
bundle.putBoolean(WebFragment.KEY_REQUIRE_BACK_CONFIRMATION, true);
|
||||
bundle.putString(WebFragment.KEY_BACK_CONFIRMATION_CONTENT, "退出后将不保存当前游戏进度,确定退出吗?");
|
||||
}
|
||||
return getTargetIntent(context, WebActivity.class, WebFragment.class, bundle);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View.OnClickListener provideNavigationItemClickListener() {
|
||||
Bundle bundle = getIntent().getBundleExtra(NORMAL_FRAGMENT_BUNDLE);
|
||||
|
||||
Reference in New Issue
Block a user