Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A213795B9 for ; Tue, 24 Apr 2012 20:27:15 +0000 (UTC) Received: (qmail 16220 invoked by uid 500); 24 Apr 2012 20:27:15 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 16197 invoked by uid 500); 24 Apr 2012 20:27:15 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 16188 invoked by uid 99); 24 Apr 2012 20:27:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 20:27:15 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of curtis.bryce@gmail.com designates 209.85.217.175 as permitted sender) Received: from [209.85.217.175] (HELO mail-lb0-f175.google.com) (209.85.217.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 20:27:09 +0000 Received: by lbjn8 with SMTP id n8so846940lbj.6 for ; Tue, 24 Apr 2012 13:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=G6WeA/yNWlI9FOHVkfIjPu9wekwNvl+9anT57YHpnzg=; b=pzUR1QPFY6VXJkZkVKNPgVc/MWfxr+lVI5Y6xiwcuIjlnM6cyqChxIb0s84kZ8XKIE lgay7j7KUECaTd7iJ7QuJUmkj23zqMxyHPRrDzPbC5p9hvKQQA2FMFvSxHbZ8AdHLIUB 30b59DZQouXfCbU8YJ41jWPDoLeQpS9UbrxGylcZ5VhZOj8a0JzvNW8xfiNpgZm9/mTc ZOsa08cEqC3vcRCEirJNYFNOsA29yOybV4VROJiiHobfjDEx/KiAKNLyV9AqM8CXgNd2 YVuQ7MAukDjMFs1MTbOBso2dtkQ9R6gANc2IXhnsj+18zR422v33rJF/fVizscAK0R1B nGJA== MIME-Version: 1.0 Received: by 10.152.104.43 with SMTP id gb11mr20538073lab.8.1335299209043; Tue, 24 Apr 2012 13:26:49 -0700 (PDT) Received: by 10.112.92.38 with HTTP; Tue, 24 Apr 2012 13:26:48 -0700 (PDT) In-Reply-To: References: Date: Tue, 24 Apr 2012 15:26:48 -0500 Message-ID: Subject: Re: Better Splash Screen? From: Bryce Curtis To: callback-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable While not everyone likes splash screens they are required for some products. Thus, they should be optional. When used, they need to be displayed as soon as possible - before any HTML/JS code has been loaded would be best. Different apps require they are dismissed at different times. If it works, the plugin route would have these features. You could have the splash screen load at app start by setting onload=3D"true" in the plugins.xml. Then you dismiss it by calling the only plugin api... hide(). Sound do-able? On Tue, Apr 24, 2012 at 2:53 PM, Simon MacDonald wrote: > Okay, conf call done. Lemme catch up on this thread. > > @Brian - I was able to find a layout to use for the dialog that covers th= e > entire screen so we can remove that problem from the minus category. I wa= s > able to test it on a phone, phablet and tablet screen sizes. The new spla= sh > screen functionality looks exactly the same as what we have currently it > just does it differently under the hood. > > @Fil & @Joe - Yeah, I think splash screens are a waste of time too but in > our case they make sense. With the splash screen in place we can load the > app in the background and we will get rid of that problem where people > complain the app starts up with a black screen then the web view is creat= ed > causing a white flash before the app is loaded. I just want the Android > platform to have the same functionality as iOS. > > @Joe - I didn't want to use an ImageView as then we'd have to get into > starting a new activity and all the other fun that entails. > > @Fil - Do you think we should make it optional for the splash screen to b= e > dismissed on "deviceready"? Some folks might want to let the splash be > displayed for the full timeout value provided in the loadUrl call. > > This change on Android can go in for 1.7 or 1.8. Whatever folks want. > > Simon Mac Donald > http://hi.im/simonmacdonald > > > On Tue, Apr 24, 2012 at 3:37 PM, Joe Bowser wrote: > >> Sounds good! =A0Let's create some tickets in JIRA and hash this out. >> >> On Tue, Apr 24, 2012 at 10:16 AM, Filip Maj wrote: >> >> > I am in HUGE favor of creating a Splash Screen plugin (iOS does this >> > already, it looks like Simon is going down that path) that we make wor= k >> > consistently across platforms. >> > >> > Would be a good exercise in plugin authoring, something that we need t= o >> > work out details for for 2.0 anyways (but that's a separate thread). >> > >> > Finally: the JS for the Splash Screen plugin would be dead simple. At = its >> > simplest: >> > >> > cordova.onDeviceReady.subscribeOnce(function() { exec(function(){}, >> > function(){}, 'splashscreen', 'hide', []); }); >> > >> > Or, more complex, we could expose as a core cordova API and offer APIs >> for >> > showing and hiding. >> > >> > On 4/24/12 9:37 AM, "Joe Bowser" wrote: >> > >> > >OK, here's where I go against what I've been saying for years about >> > >Spashscreens being a stupid exercise in branding and come out in defe= nce >> > >of >> > >this approach. =A0That being said, does it have to be a dialog, or ca= n we >> do >> > >something tricky with an ImageView in the background. =A0I agree that= our >> > >splashscreen is janky, and needs to be fixed, but we should make it s= o >> > >that >> > >you can't tell it's a Cordova app. >> > > >> > >But yeah, I'm fine with this code being put into the CordovaWebView >> branch >> > >and tickets being added to get it here. >> > > >> > >On Tue, Apr 24, 2012 at 9:23 AM, Brian LeRoux wrote: >> > > >> > >> Woah, hold up: >> > >> >> > >> "The only downside is the dialog does not fully cover the screen." >> > >> >> > >> Not in a spot to test this yet but how much is covered / how big is >> > >> the visual change? >> > >> >> > >> If its at all different would we not want to deprecate the old >> > >> functionality and warn of the new behavior? >> > >> >> > >> Final thought, perhaps we could consider axing splash screens >> > >> altogether. It kinda should be handled by the client code and not t= he >> > >> native side, imo. >> > >> >> > >> >> > >> On Tue, Apr 24, 2012 at 8:21 AM, Joe Bowser >> wrote: >> > >> > On Tue, Apr 24, 2012 at 7:40 AM, Simon MacDonald >> > >> > wrote: >> > >> > >> > >> >> Hey, >> > >> >> >> > >> >> I did a bit of a refactor on the Android splash screen. I didn't >> like >> > >> the >> > >> >> fact that when you do a: >> > >> >> >> > >> >> *super*.setIntegerProperty("splashscreen", R.drawable.*splash)*; >> > >> >> >> > >> >> *super*.loadUrl("file:///android_asset/www/conn.html", 5000); >> > >> >> The splash screen is shown for 5 seconds then the web view begin= s >> to >> > >> load >> > >> >> the page. That is, the splash screen is a blocking call. >> > >> >> >> > >> >> I believe I've made this better by changing the way we display t= he >> > >> splash >> > >> >> screen to a dialog box. This way the web view underneath the dia= log >> > >>can >> > >> >> continue to load the web page while splash screen is being >> displayed. >> > >> >> Additionally, I've added a splash screen plugin to Android so yo= u >> can >> > >> call >> > >> >> it's hide method to make the splash screen go away in your >> > >>onDeviceReady >> > >> >> handler. For developers using our API I haven't changed the way = the >> > >> splash >> > >> >> screen is setup so they won't be required to change their code. = The >> > >>only >> > >> >> downside is the dialog does not fully cover the screen. >> > >> >> >> > >> >> Here is the commit: >> > >> >> >> > >> >> >> > >> >> >> > >> >> > >> >> > >> https://github.com/macdonst/cordova-android/commit/d359eaf4534dc0eed91cd= a >> > >>c7e9e0bd23ab36bc46 >> > >> >> >> > >> >> Comments? Is this something I should push into the Android repo = for >> > >>1.8? >> > >> >> Can we hook something in the common JS so folks can call hide on >> the >> > >> splash >> > >> >> screen plugin on Android and iOS? >> > >> >> >> > >> >> >> > >> > Looks good, and it solves a problem that we've been having with t= he >> > >>way >> > >> we >> > >> > do splashscreens. =A0We may need to add exception handling for th= e >> > >>plugin >> > >> if >> > >> > people do something stupid like use it with a CordovaWebView, but >> > >>other >> > >> > than that it looks good and is much easier to read than the curre= nt >> > >>code. >> > >> > Please push this into the Android repo for 1.8. =A0Let me know if >> > >>there's >> > >> > problems merging it with the CordovaWebView branch. >> > >> > >> > >> > Joe >> > >> >> > >> > >>