use meta viewport for embedded webviews
This commit is contained in:
parent
ee886a6a76
commit
f16095ce53
@ -102,15 +102,19 @@ public class ArticleFragment extends Fragment implements OnClickListener {
|
|||||||
String content;
|
String content;
|
||||||
String cssOverride = "";
|
String cssOverride = "";
|
||||||
|
|
||||||
|
web.setBackgroundColor(0x00000000);
|
||||||
|
|
||||||
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
||||||
web.setBackgroundColor(android.R.color.black);
|
cssOverride = "body { background : transparent; color : #e0e0e0}\n";
|
||||||
cssOverride = "body { background : black; color : #f0f0f0}\n";
|
} else {
|
||||||
|
cssOverride = "body { background : transparent; }\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
content =
|
content =
|
||||||
"<html>" +
|
"<html>" +
|
||||||
"<head>" +
|
"<head>" +
|
||||||
"<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">" +
|
"<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">" +
|
||||||
|
"<meta name=\"viewport\" content=\"target-densitydpi=device-dpi\" />" +
|
||||||
"<style type=\"text/css\">" +
|
"<style type=\"text/css\">" +
|
||||||
cssOverride +
|
cssOverride +
|
||||||
"img { max-width : 90%; }" +
|
"img { max-width : 90%; }" +
|
||||||
|
@ -401,15 +401,19 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
String content;
|
String content;
|
||||||
String cssOverride = "";
|
String cssOverride = "";
|
||||||
|
|
||||||
|
web.setBackgroundColor(0x00000000);
|
||||||
|
|
||||||
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) {
|
||||||
web.setBackgroundColor(android.R.color.black);
|
cssOverride = "body { background : transparent; color : #e0e0e0}\n";
|
||||||
cssOverride = "body { background : black; color : #f0f0f0}\n";
|
} else {
|
||||||
|
cssOverride = "body { background : transparent; }\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
content =
|
content =
|
||||||
"<html>" +
|
"<html>" +
|
||||||
"<head>" +
|
"<head>" +
|
||||||
"<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">" +
|
"<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\" />" +
|
||||||
|
"<meta name=\"viewport\" content=\"target-densitydpi=device-dpi\" />" +
|
||||||
"<style type=\"text/css\">" +
|
"<style type=\"text/css\">" +
|
||||||
cssOverride +
|
cssOverride +
|
||||||
"img { max-width : 90%; }" +
|
"img { max-width : 90%; }" +
|
||||||
|
Loading…
Reference in New Issue
Block a user