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>" +
|
"</head>" +
|
||||||
"<body>" + m_article.content + "</body></html>";
|
"<body>" + m_article.content + "</body></html>";
|
||||||
|
|
||||||
|
try {
|
||||||
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
if (m_onlineServices.isSmallScreen())
|
if (m_onlineServices.isSmallScreen())
|
||||||
web.setOnTouchListener(m_gestureListener);
|
web.setOnTouchListener(m_gestureListener);
|
||||||
|
@ -162,7 +162,11 @@ public class OfflineArticleFragment extends Fragment implements OnClickListener
|
|||||||
"</head>" +
|
"</head>" +
|
||||||
"<body>" + articleContent + "</body></html>";
|
"<body>" + articleContent + "</body></html>";
|
||||||
|
|
||||||
|
try {
|
||||||
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
if (m_offlineServices.isSmallScreen())
|
if (m_offlineServices.isSmallScreen())
|
||||||
web.setOnTouchListener(m_gestureListener);
|
web.setOnTouchListener(m_gestureListener);
|
||||||
|
Loading…
Reference in New Issue
Block a user