cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcesarmobile <...@git.apache.org>
Subject [GitHub] cordova-android pull request #316: CB-11078 Empty string for BackgroundColor...
Date Thu, 28 Jul 2016 07:11:36 GMT
Github user jcesarmobile commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/316#discussion_r72573856
  
    --- Diff: framework/src/org/apache/cordova/CordovaActivity.java ---
    @@ -175,9 +175,13 @@ protected void createViews() {
             setContentView(appView.getView());
     
             if (preferences.contains("BackgroundColor")) {
    -            int backgroundColor = preferences.getInteger("BackgroundColor", Color.BLACK);
    -            // Background of activity:
    -            appView.getView().setBackgroundColor(backgroundColor);
    +            try {
    +                int backgroundColor = preferences.getInteger("BackgroundColor", Color.BLACK);
    +                // Background of activity:
    +                appView.getView().setBackgroundColor(backgroundColor);
    +            }catch (NumberFormatException e){
    +                System.out.println(e.getMessage());
    --- End diff --
    
    Can you use e.printStackTrace(); instead of System.out?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message