article webview: set base url to properly display protocol relative
images
This commit is contained in:
parent
3c799d68da
commit
ccb815ec4a
@ -286,7 +286,7 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
|
|||||||
content += "<p> </p><p> </p><p> </p><p> </p></body></html>";
|
content += "<p> </p><p> </p><p> </p><p> </p></body></html>";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
web.loadDataWithBaseURL(m_article.link, content, "text/html", "utf-8", null);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,8 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
|
|||||||
|
|
||||||
TextView title = (TextView)view.findViewById(R.id.title);
|
TextView title = (TextView)view.findViewById(R.id.title);
|
||||||
|
|
||||||
|
final String link = m_cursor.getString(m_cursor.getColumnIndex("link"));
|
||||||
|
|
||||||
if (title != null) {
|
if (title != null) {
|
||||||
|
|
||||||
String titleStr;
|
String titleStr;
|
||||||
@ -143,8 +145,6 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
|
|||||||
else
|
else
|
||||||
titleStr = m_cursor.getString(m_cursor.getColumnIndex("title"));
|
titleStr = m_cursor.getString(m_cursor.getColumnIndex("title"));
|
||||||
|
|
||||||
final String link = m_cursor.getString(m_cursor.getColumnIndex("link"));
|
|
||||||
|
|
||||||
title.setText(titleStr);
|
title.setText(titleStr);
|
||||||
//title.setPaintFlags(title.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
//title.setPaintFlags(title.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||||
title.setOnClickListener(new OnClickListener() {
|
title.setOnClickListener(new OnClickListener() {
|
||||||
@ -281,7 +281,7 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
|
|||||||
"<body>" + articleContent + "<p> </p><p> </p><p> </p><p> </p></body></html>";
|
"<body>" + articleContent + "<p> </p><p> </p><p> </p><p> </p></body></html>";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
|
web.loadDataWithBaseURL(link, content, "text/html", "utf-8", null);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user