webview: try to trap runtimeexception
This commit is contained in:
parent
175c703650
commit
59839b7e08
@ -126,7 +126,11 @@ public class ArticleFragment extends Fragment implements OnClickListener {
|
||||
"</head>" +
|
||||
"<body>" + m_article.content + "</body></html>";
|
||||
|
||||
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
||||
try {
|
||||
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
||||
} catch (RuntimeException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (m_onlineServices.isSmallScreen())
|
||||
web.setOnTouchListener(m_gestureListener);
|
||||
|
@ -162,7 +162,11 @@ public class OfflineArticleFragment extends Fragment implements OnClickListener
|
||||
"</head>" +
|
||||
"<body>" + articleContent + "</body></html>";
|
||||
|
||||
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
||||
try {
|
||||
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
||||
} catch (RuntimeException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (m_offlineServices.isSmallScreen())
|
||||
web.setOnTouchListener(m_gestureListener);
|
||||
|
Loading…
Reference in New Issue
Block a user