From a18dacf5f269ad2a5f93192d789bc8ef8f998e76 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Thu, 31 Jan 2013 10:44:46 -0800 Subject: [PATCH] CB-2296 - Adding the screenshot configuration --- framework/src/org/apache/cordova/Config.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/framework/src/org/apache/cordova/Config.java b/framework/src/org/apache/cordova/Config.java index 7ecb9275..01eb2bb7 100644 --- a/framework/src/org/apache/cordova/Config.java +++ b/framework/src/org/apache/cordova/Config.java @@ -114,10 +114,17 @@ public class Config { Note: We should probably pass in the classname for the variable splash on splashscreen! */ if(name.equals("splashscreen")) { - int value = xml.getAttributeIntValue(null, "value", R.drawable.splash); - action.getIntent().putExtra(name, value); - LOG.i("CordovaLog", "Found preference for %s=%d", name, value); - Log.d("CordovaLog", "Found preference for " + name + "=" + Integer.toString(value)); + String value = xml.getAttributeValue(null, "value"); + int resource = 0; + if (value != null) + { + value = "splash"; + } + resource = action.getResources().getIdentifier(value, "drawable", action.getPackageName()); + + action.getIntent().putExtra(name, resource); + LOG.i("CordovaLog", "Found preference for %s=%s", name, value); + Log.d("CordovaLog", "Found preference for " + name + "=" + value); } else if(name.equals("backgroundColor")) { int value = xml.getAttributeIntValue(null, "value", Color.BLACK);