{ "id": "161616", "key": "AC-4015", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2016-07-08T21:14:21.000+0000", "created": "2016-07-08T13:52:27.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-07-11T11:00:59.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "When I load a Window with a WebView\r\ni.e.\r\n\r\n\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor: Alloy.Globals.colors.Yellow \r\n });\t\r\nvar webView = Titanium.UI.createWebView({ \r\n url : local_html_file, \r\n backgroundColor : Alloy.Globals.colors.Yellow, \r\n });\r\nwin.add(webView); \r\n\r\nwin.addEventListener('close', function() { \r\n win.removeEventListener('close', function() {});\r\n win.remove(webView); \r\n webView = null; \r\n win = null; \r\n});\r\nwin.open();\r\n.\r\n.\r\n.\r\nNow in this case\r\nA yellow background displays for a fraction of second...\r\nthen white screen displays for a second until the Window(with webview) loads completely\r\nThen the Window loads With the webview\r\n.\r\n.\r\nI want to change the background of in between shown white screen to Yellow instead.\r\n(From : When window with webview is loaded and webview in over written to window and white screen is shown\r\n To : When WebView is loaded)\r\nHow can this be done?\r\n(Please mention any titanium core library file change if required to perform this action for now)", "attachment": [], "flagged": false, "summary": "Change Background Color for WebView Loading White Screen ", "creator": { "name": "sanchi1706@gmail.com", "key": "sanchi1706@gmail.com", "displayName": "Sanchi Varma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sanchi1706@gmail.com", "key": "sanchi1706@gmail.com", "displayName": "Sanchi Varma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Operating System\r\n Name = Microsoft Windows 10 Pro\r\n Version = 10.0.10586\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 5.8GB\r\n\r\nNode.js\r\n Node.js Version = 4.4.5\r\n npm Version = 2.15.5\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.8\r\n node-appc Version = 0.2.31\r\n\r\nTitanium SDKs\r\n 5.4.0.v20160601151241 (active)\r\n Version = 5.4.0\r\n Install Location = C:\\ProgramData\\Titanium\\mobilesdk\\win32\\5.4.0.v20160601151241\r\n Platforms = android, mobileweb, windows\r\n git Hash = c012548\r\n git Timestamp = 06/01/16 15:12\r\n node-appc Version = 0.2.35\r\n 5.3.0.GA\r\n Version = 5.3.0\r\n Install Location = C:\\ProgramData\\Titanium\\mobilesdk\\win32\\5.3.0.GA\r\n Platforms = android, mobileweb, windows\r\n git Hash = 94fa8af\r\n git Timestamp = 06/01/16 10:17\r\n node-appc Version = 0.2.33\r\n 5.2.2.GA\r\n Version = 5.2.2\r\n Install Location = C:\\ProgramData\\Titanium\\mobilesdk\\win32\\5.2.2.GA\r\n Platforms = android, mobileweb, windows\r\n git Hash = b685ddb\r\n git Timestamp = 03/28/16 14:12\r\n node-appc Version = 0.2.33\r\n\r\nIntel® Hardware Accelerated Execution Manager (HAXM)\r\n Not installed\r\n\r\nJava Development Kit\r\n Version = 1.7.0_80\r\n Java Home = C:\\Program Files (x86)\\Java\\jdk1.7.0_80\r\n\r\nGenymotion\r\n Path = not found\r\n Genymotion Executable = not found\r\n Genymotion Player = not found\r\n Home = not found\r\n\r\nVirtualBox\r\n Executable = not found\r\n Version = unknown\r\n\r\nAndroid SDK\r\n Android Executable = C:\\Program Files (x86)\\Android\\android-sdk\\tools\\android.bat\r\n ADB Executable = C:\\Program Files (x86)\\Android\\android-sdk\\platform-tools\\adb.exe\r\n SDK Path = C:\\Program Files (x86)\\Android\\android-sdk\r\n\r\nAndroid NDK\r\n NDK Path = not found\r\n NDK Version = not found\r\n\r\nAndroid Platforms\r\n 1) android-19\r\n Name = Android 4.4.2 **Not supported by Titanium SDK 5.4.0.v20160601151241**\r\n API Level = 19\r\n Revision = 4\r\n Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in\r\n ABIs = armeabi-v7a, x86\r\n Path = C:\\Program Files (x86)\\Android\\android-sdk\\platforms\\android-19\r\n 2) android-21\r\n Name = Android 5.0.1 **Not supported by Titanium SDK 5.4.0.v20160601151241**\r\n API Level = 21\r\n Revision = 2\r\n Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in\r\n ABIs = no ABIs.\r\n Path = C:\\Program Files (x86)\\Android\\android-sdk\\platforms\\android-21\r\n 3) android-22\r\n Name = Android 5.1.1 **Not supported by Titanium SDK 5.4.0.v20160601151241**\r\n API Level = 22\r\n Revision = 2\r\n Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in\r\n ABIs = no ABIs.\r\n Path = C:\\Program Files (x86)\\Android\\android-sdk\\platforms\\android-22\r\n 4) android-23\r\n Name = Android 6.0\r\n API Level = 23\r\n Revision = 1\r\n Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidW\r\nearRoundChin320x290, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare320x320\r\n ABIs = armeabi-v7a, x86, x86_64\r\n Path = C:\\Program Files (x86)\\Android\\android-sdk\\platforms\\android-23\r\n\r\nAndroid Add-Ons\r\n 5) Google Inc.:Google APIs:19\r\n Name = Android 4.4.2 (API level 19) **Not supported by Titanium SDK 5.4.0.v20160601151241**\r\n Vendor = Google Inc.\r\n Revision = 20\r\n Description = Android + Google APIs\r\n Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in\r\n ABIs = no ABIs.\r\n Path = C:\\Program Files (x86)\\Android\\android-sdk\\add-ons\\addon-google_apis-google-19\r\n Libraries = com.google.android.media.effects: Collection of video effects (effects.jar)\r\n com.android.future.usb.accessory: API for USB Accessories (usb.jar)\r\n com.google.android.maps: API for Google Maps (maps.jar)\r\n\r\nConnected Android Devices\r\n None\r\n\r\nMicrosoft (R) Visual Studio\r\n 14.0 (selected)\r\n Path = C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\\r\n CLR Version = v4.0.30319\r\n MSBuild Version = v14.0.25123.0\r\n Windows Phone SDKs = not installed\r\n\r\nMicrosoft (R) Windows Phone SDK\r\n 10.0\r\n Path = C:\\Program Files (x86)\\Windows Kits\\10\\\r\n 8.1 (selected)\r\n Path = C:\\Program Files (x86)\\Microsoft SDKs\\Windows Phone\\v8.1\\\r\n\r\nWindows PowerShell\r\n Enabled = yes\r\n\r\nWindows Phone Emulators\r\n8.1\r\n10.0\r\n Mobile Emulator 10.0.10586.0 WVGA 4 inch 512MB\r\n UDID 10-0-1\r\n Mobile Emulator 10.0.10586.0 WVGA 4 inch 1GB\r\n UDID 10-0-2\r\n Mobile Emulator 10.0.10586.0 WXGA 4.5 inch 1GB\r\n UDID 10-0-3\r\n Mobile Emulator 10.0.10586.0 720p 5 inch 1GB\r\n UDID 10-0-4\r\n Mobile Emulator 10.0.10586.0 1080p 6 inch 2GB\r\n UDID 10-0-5\r\n Mobile Emulator 10.0.10586.0 QHD 5.2 inch 3GB\r\n UDID 10-0-6\r\n\r\nWindows Phone Devices\r\n Lumia 540 Dual SIM (RM-1141)\r\n UDID 004a0090-9056-7d8b-0000-000000000000\r\n", "comment": { "comments": [ { "id": "390195", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey there,\r\n\r\nsee this native answer on it: http://stackoverflow.com/a/6605214/5537752. You can do the same in Titanium, for example by using {{webView.setHidden(true); and inside the {{load}} event, use {{webView.setHidden(false)}}. It's a very common way to control the background before the content is loaded. You can also wrap it into a view that has a backgroundColor and hide/show it inside there.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-08T21:14:08.000+0000", "updated": "2016-07-08T21:14:08.000+0000" }, { "id": "390278", "author": { "name": "sanchi1706@gmail.com", "key": "sanchi1706@gmail.com", "displayName": "Sanchi Varma", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks Hans.\r\nAlthough setHidden() was not identified as a valid method, but using \"opacity : 0\" while defining web view, and \"webview.opacity = 1\" in \"load\" event listener did the trick. \r\nThe issue is resolved now", "updateAuthor": { "name": "sanchi1706@gmail.com", "key": "sanchi1706@gmail.com", "displayName": "Sanchi Varma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-11T09:56:56.000+0000", "updated": "2016-07-11T09:56:56.000+0000" }, { "id": "390279", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Sorry, I meant {{setVisible(false)}}. Great that it works now!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-11T10:32:21.000+0000", "updated": "2016-07-11T10:32:21.000+0000" }, { "id": "390282", "author": { "name": "sanchi1706@gmail.com", "key": "sanchi1706@gmail.com", "displayName": "Sanchi Varma", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks Hans... setVisible(false) works perfect", "updateAuthor": { "name": "sanchi1706@gmail.com", "key": "sanchi1706@gmail.com", "displayName": "Sanchi Varma", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-11T11:00:59.000+0000", "updated": "2016-07-11T11:00:59.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }