Commit 9d8086b5 authored by fallenstardust's avatar fallenstardust Committed by GitHub

Merge pull request #74 from mercury233/patch-pre-download-page

update pre download page
parents 6505490a 85675d7a
...@@ -134,7 +134,7 @@ public class WebActivity extends BaseActivity { ...@@ -134,7 +134,7 @@ public class WebActivity extends BaseActivity {
});*/ });*/
if (doIntent(getIntent())) { if (doIntent(getIntent())) {
mWebViewPlus.loadUrl(mUrl); mWebViewPlus.loadUrl(mUrl);
if (mUrl.equals(URL_YGO233_ADVANCE)) { if (mUrl.startsWith(URL_YGO233_ADVANCE)) {
btn_download.setVisibility(View.VISIBLE); btn_download.setVisibility(View.VISIBLE);
} else { } else {
btn_download.setVisibility(View.GONE); btn_download.setVisibility(View.GONE);
......
...@@ -703,7 +703,11 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene ...@@ -703,7 +703,11 @@ public class HomeFragment extends BaseFragemnt implements OnDuelAssistantListene
YGOStarter.startGame(getActivity(), null, "-k", "-s"); YGOStarter.startGame(getActivity(), null, "-k", "-s");
break; break;
case R.id.action_download_ex: case R.id.action_download_ex:
WebActivity.open(getContext(), getString(R.string.action_download_expansions), Constants.URL_YGO233_ADVANCE); String aurl = Constants.URL_YGO233_ADVANCE;
if (ll_new_notice.getVisibility() == View.VISIBLE) {
aurl = aurl + "#pre_update_title";
}
WebActivity.open(getContext(), getString(R.string.action_download_expansions), aurl);
ll_new_notice.setVisibility(View.GONE); ll_new_notice.setVisibility(View.GONE);
break; break;
case R.id.action_help: { case R.id.action_help: {
......
package cn.garymb.ygomobile.ui.mycard; package cn.garymb.ygomobile.ui.mycard;
import cn.garymb.ygomobile.lite.BuildConfig;
import java.text.MessageFormat;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
...@@ -69,6 +72,13 @@ public class X5WebView extends WebView { ...@@ -69,6 +72,13 @@ public class X5WebView extends WebView {
setHorizontalScrollBarEnabled(false); setHorizontalScrollBarEnabled(false);
webSetting.setAllowContentAccess(true); webSetting.setAllowContentAccess(true);
webSetting.setMixedContentMode(WebSettings.LOAD_NORMAL); webSetting.setMixedContentMode(WebSettings.LOAD_NORMAL);
webSetting.setUserAgentString(webSetting.getUserAgentString() + MessageFormat.format(
" YGOMobile/{0} ({1} {2,number,#})",
BuildConfig.VERSION_NAME,
BuildConfig.APPLICATION_ID,
BuildConfig.VERSION_CODE
));
} }
@Override @Override
......
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