cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject android commit: CB-3337: Not sure why the splashscreen was changed, fixing 9-patch
Date Fri, 03 May 2013 22:38:00 GMT
Updated Branches:
  refs/heads/master 21614ea89 -> dbeb252fe


CB-3337: Not sure why the splashscreen was changed, fixing 9-patch


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/dbeb252f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/dbeb252f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/dbeb252f

Branch: refs/heads/master
Commit: dbeb252feec836539c84b53030b197b33e2f915d
Parents: 21614ea
Author: Joe Bowser <bowserj@apache.org>
Authored: Fri May 3 15:37:48 2013 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Fri May 3 15:37:48 2013 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/DroidGap.java |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/dbeb252f/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java
index 3c6610f..a00d43f 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


Mime
View raw message