You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2013/05/10 23:03:35 UTC
[10/13] android commit: CB-3337: Not sure why the splashscreen was
changed, fixing 9-patch
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/3.0.0
Commit: dbeb252feec836539c84b53030b197b33e2f915d
Parents: 21614ea
Author: Joe Bowser <bo...@apache.org>
Authored: Fri May 3 15:37:48 2013 -0700
Committer: Joe Bowser <bo...@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