From dbeb252feec836539c84b53030b197b33e2f915d Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Fri, 3 May 2013 15:37:48 -0700 Subject: [PATCH] CB-3337: Not sure why the splashscreen was changed, fixing 9-patch --- framework/src/org/apache/cordova/DroidGap.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index 3c6610f6..a00d43f4 100755 --- a/framework/src/org/apache/cordova/DroidGap.java +++ b/framework/src/org/apache/cordova/DroidGap.java @@ -1040,14 +1040,8 @@ public class DroidGap extends Activity implements CordovaInterface { root.setBackgroundColor(that.getIntegerProperty("backgroundColor", Color.BLACK)); root.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 0.0F)); - // We want the splashscreen to keep its ratio, - // for this we need to use an ImageView and not simply the background of the LinearLayout - ImageView splashscreenView = new ImageView(that.getActivity()); - splashscreenView.setImageResource(that.splashscreen); - splashscreenView.setScaleType(ImageView.ScaleType.CENTER_CROP); // similar to the background-size:cover CSS property - splashscreenView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); - root.addView(splashscreenView); - + root.setBackgroundResource(that.splashscreen); + // Create and show the dialog splashDialog = new Dialog(that, android.R.style.Theme_Translucent_NoTitleBar); // check to see if the splash screen should be full screen