mirror of https://github.com/readrops/Readrops.git
Disable webview scrollbar
This commit is contained in:
parent
8867eefe05
commit
5813025b1b
|
@ -31,12 +31,15 @@ public class ReadropsWebView extends WebView {
|
||||||
|
|
||||||
@SuppressLint("SetJavaScriptEnabled")
|
@SuppressLint("SetJavaScriptEnabled")
|
||||||
private void init() {
|
private void init() {
|
||||||
|
if (!isInEditMode()) {
|
||||||
WebSettings settings = getSettings();
|
WebSettings settings = getSettings();
|
||||||
|
|
||||||
settings.setJavaScriptEnabled(true);
|
settings.setJavaScriptEnabled(true);
|
||||||
settings.setBuiltInZoomControls(true);
|
settings.setBuiltInZoomControls(true);
|
||||||
settings.setDisplayZoomControls(false);
|
settings.setDisplayZoomControls(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
setVerticalScrollBarEnabled(false);
|
||||||
setBackgroundColor(getResources().getColor(R.color.colorBackground));
|
setBackgroundColor(getResources().getColor(R.color.colorBackground));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,9 +49,10 @@ public class ReadropsWebView extends WebView {
|
||||||
|
|
||||||
formatDocument(document);
|
formatDocument(document);
|
||||||
|
|
||||||
|
int color = itemWithFeed.getColor() != 0 ? itemWithFeed.getColor() : getResources().getColor(R.color.colorPrimary);
|
||||||
return getContext().getString(R.string.webview_html_template,
|
return getContext().getString(R.string.webview_html_template,
|
||||||
Utils.getCssColor(itemWithFeed.getBgColor() != 0 ? itemWithFeed.getBgColor() :
|
Utils.getCssColor(itemWithFeed.getBgColor() != 0 ? itemWithFeed.getBgColor() :
|
||||||
(itemWithFeed.getColor() != 0 ? itemWithFeed.getColor() : getResources().getColor(R.color.colorPrimary))),
|
color),
|
||||||
document.body().html());
|
document.body().html());
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue