You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2013/12/14 14:04:34 UTC

android commit: CB-5489: clean up docs for deprecated methods

Updated Branches:
  refs/heads/master adba84ae6 -> 1482c07ae


CB-5489: clean up docs for deprecated methods

- fixed grammer in log message in Config.java
- updated the class javadoc in CordovaActivity to catch up to reality: use config.xml instead of set*Property() methods.
- added deprecation message for SetFullscreen


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

Branch: refs/heads/master
Commit: 1482c07ae48c255bffdef83b454ec85c0e8e0670
Parents: adba84a
Author: Marcel Kinard <cm...@gmail.com>
Authored: Fri Dec 6 12:27:03 2013 -0500
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Sat Dec 14 08:02:58 2013 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/Config.java    |  2 +-
 .../src/org/apache/cordova/CordovaActivity.java | 60 +++-----------------
 2 files changed, 10 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1482c07a/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 eeedaf2..0185338 100644
--- a/framework/src/org/apache/cordova/Config.java
+++ b/framework/src/org/apache/cordova/Config.java
@@ -99,7 +99,7 @@ public class Config {
                 }
                 else if (strNode.equals("log")) {
                     String level = xml.getAttributeValue(null, "level");
-                    Log.d(TAG, "The <log> tags is deprecated. Use <preference name=\"loglevel\" value=\"" + level + "\"/> instead.");
+                    Log.d(TAG, "The <log> tag is deprecated. Use <preference name=\"loglevel\" value=\"" + level + "\"/> instead.");
                     if (level != null) {
                         LOG.setLogLevel(level);
                     }

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1482c07a/framework/src/org/apache/cordova/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java
index 567ed1b..a8ea6b6 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -66,6 +66,7 @@ import android.widget.LinearLayout;
  * 
  * <pre>
  *     package org.apache.cordova.examples;
+ *
  *     import android.os.Bundle;
  *     import org.apache.cordova.*;
  *
@@ -73,63 +74,19 @@ import android.widget.LinearLayout;
  *       &#64;Override
  *       public void onCreate(Bundle savedInstanceState) {
  *         super.onCreate(savedInstanceState);
- *
- *         // Set properties for activity
- *         super.setStringProperty("loadingDialog", "Title,Message"); // show loading dialog
- *         super.setStringProperty("errorUrl", "file:///android_asset/www/error.html"); // if error loading file in super.loadUrl().
- *
- *         // Clear cache if you want
- *         super.appView.clearCache(true);
- *
+ *         super.init();
  *         // Load your application
- *         super.setIntegerProperty("splashscreen", R.drawable.splash); // load splash.jpg image from the resource drawable directory
- *         super.loadUrl("file:///android_asset/www/index.html", 3000); // show splash screen 3 sec before loading app
+ *         super.loadUrl(Config.getStartUrl());
  *       }
  *     }
  * </pre>
  * 
- * Properties: The application can be configured using the following properties:
- * 
- * <pre>
- *      // Display a native loading dialog when loading app.  Format for value = "Title,Message".
- *      // (String - default=null)
- *      super.setStringProperty("loadingDialog", "Wait,Loading Demo...");
- *
- *      // Display a native loading dialog when loading sub-pages.  Format for value = "Title,Message".
- *      // (String - default=null)
- *      super.setStringProperty("loadingPageDialog", "Loading page...");
- *
- *      // Load a splash screen image from the resource drawable directory.
- *      // (Integer - default=0)
- *      super.setIntegerProperty("splashscreen", R.drawable.splash);
- *
- *      // Set the background color.
- *      // (Integer - default=0 or BLACK)
- *      super.setIntegerProperty("backgroundColor", Color.WHITE);
- *
- *      // Time in msec to wait before triggering a timeout error when loading
- *      // with super.loadUrl().  (Integer - default=20000)
- *      super.setIntegerProperty("loadUrlTimeoutValue", 60000);
- *
- *      // URL to load if there's an error loading specified URL with loadUrl().
- *      // Should be a local URL starting with file://. (String - default=null)
- *      super.setStringProperty("errorUrl", "file:///android_asset/www/error.html");
- *
- *      // Enable app to keep running in background. (Boolean - default=true)
- *      super.setBooleanProperty("keepRunning", false);
- * </pre>
- *
- * Cordova.xml configuration:
- * 
- * <pre>
- *      Cordova uses a configuration file at res/xml/cordova.xml to specify the following settings.
+ * Cordova xml configuration: Cordova uses a configuration file at 
+ * res/xml/config.xml to specify its settings. See "The config.xml File"
+ * guide in cordova-docs at http://cordova.apache.org/docs for the documentation
+ * for the configuration. The use of the set*Property() methods is
+ * deprecated in favor of the config.xml file.
  *
- *      Approved list of URLs that can be loaded into Cordova
- *          &lt;access origin="http://server regexp" subdomains="true" /&gt;
- *      Log level: ERROR, WARN, INFO, DEBUG, VERBOSE (default=ERROR)
- *          &lt;log level="DEBUG" /&gt;
- * </pre>
- * 
  */
 public class CordovaActivity extends Activity implements CordovaInterface {
     public static String TAG = "CordovaActivity";
@@ -272,6 +229,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
 
         if(this.getBooleanProperty("SetFullscreen", false))
         {
+            Log.d(TAG, "The SetFullscreen configuration is deprecated in favor of Fullscreen, and will be removed in a future version.");
             getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                     WindowManager.LayoutParams.FLAG_FULLSCREEN);
         }