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/01/31 19:45:12 UTC
[1/2] android commit: CB-2296 - Adding the screenshot configuration
CB-2296 - Adding the screenshot configuration
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/a18dacf5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/a18dacf5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/a18dacf5
Branch: refs/heads/master
Commit: a18dacf5f269ad2a5f93192d789bc8ef8f998e76
Parents: 3610bbf
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Jan 31 10:44:46 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Jan 31 10:44:46 2013 -0800
----------------------------------------------------------------------
framework/src/org/apache/cordova/Config.java | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/a18dacf5/framework/src/org/apache/cordova/Config.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Config.java b/framework/src/org/apache/cordova/Config.java
index 7ecb927..01eb2bb 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);