From b23e852467a920eda332d4a4aa189470c69dc3b2 Mon Sep 17 00:00:00 2001 From: Scott Greenwald Date: Mon, 12 May 2014 21:03:44 -0400 Subject: [PATCH] set background of html card webview to black on instantiation The previous commit (92cfdafcfe180b5774e0935f3033f0f4d7899e3b) that tried to take care of this missed the stage of loading where the view has been instantiated but the body not loaded yet. When the body is small this stage is of negligible length, but it shows up when the body is big. --- .../com/dappervision/wearscript/managers/CardTreeManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/WearScript/src/main/java/com/dappervision/wearscript/managers/CardTreeManager.java b/WearScript/src/main/java/com/dappervision/wearscript/managers/CardTreeManager.java index 2e59223d..1fb3fb4e 100644 --- a/WearScript/src/main/java/com/dappervision/wearscript/managers/CardTreeManager.java +++ b/WearScript/src/main/java/com/dappervision/wearscript/managers/CardTreeManager.java @@ -128,6 +128,7 @@ public View cardFactory(JSONObject card) { return c.getView(); } else if (type.equals("html")) { WebView wv = new WebView(service); + wv.setBackgroundColor(0); wv.setInitialScale(100); String body = "" + card.get("html") + ""; Log.d(TAG, body);