【发布时间】:2020-05-28 12:16:52
【问题描述】:
我正在尝试使用 Web 视图将 HTML 制作为位图。在我尝试将我的应用程序置于后台之前,一切都运行正常。我让应用程序像这样来到前台
Intent it = new Intent("intent.my.action");
it.setComponent(new ComponentName(getApplicationContext().getPackageName(),
MainActivity.class.getName()));
it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().getApplicationContext().startActivity(it);
Thread.sleep(2000);
之后,我将数据加载到我的 Web 视图并等待 onPageCommitVisible 运行但从未运行!!!
webView.loadData(html, "text/html","UTF-8");
【问题讨论】:
标签: android android-studio android-layout android-fragments