Commit 6127450d authored by hal's avatar hal Committed by Gerrit Review System

minor fixes to docs for screen orientation and texting

Change-Id: I8302509a30c092e1ddab1ea84d05505b2adfb9d2
parent 6bddc40d
...@@ -682,13 +682,20 @@ public class Form extends Activity ...@@ -682,13 +682,20 @@ public class Form extends Activity
} }
/** /**
* The requested screen orientation. Commonly used values are
unspecified (-1), landscape (0), portrait (1), sensor (4), and user (2). " +
"See the Android developer documentation for ActivityInfo.Screen_Orientation for the " +
"complete list of possible settings.
*
* ScreenOrientation property getter method. * ScreenOrientation property getter method.
* *
* @return screen orientation * @return screen orientation
*/ */
@SimpleProperty(category = PropertyCategory.APPEARANCE, @SimpleProperty(category = PropertyCategory.APPEARANCE,
description = "The requested screen orientation. Commonly used values are" + description = "The requested screen orientation. Commonly used values are" +
" \"unspecified\", \"landscape\", \"portrait\", \"sensor\", and \"user\".") " unspecified (-1), landscape (0), portrait (1), sensor (4), and user (2). " +
"See the Android developer docuemntation for ActivityInfo.Screen_Orientation for the " +
"complete list of possible settings.")
public String ScreenOrientation() { public String ScreenOrientation() {
switch (getRequestedOrientation()) { switch (getRequestedOrientation()) {
case ActivityInfo.SCREEN_ORIENTATION_BEHIND: case ActivityInfo.SCREEN_ORIENTATION_BEHIND:
...@@ -728,9 +735,7 @@ public class Form extends Activity ...@@ -728,9 +735,7 @@ public class Form extends Activity
*/ */
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_SCREEN_ORIENTATION, @DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_SCREEN_ORIENTATION,
defaultValue = "unspecified") defaultValue = "unspecified")
@SimpleProperty(category = PropertyCategory.APPEARANCE, @SimpleProperty(category = PropertyCategory.APPEARANCE)
description = "The requested screen orientation. Commonly used values are" +
" \"unspecified\", \"landscape\", \"portrait\", \"sensor\", and \"behind\".")
public void ScreenOrientation(String screenOrientation) { public void ScreenOrientation(String screenOrientation) {
if (screenOrientation.equalsIgnoreCase("behind")) { if (screenOrientation.equalsIgnoreCase("behind")) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_BEHIND); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_BEHIND);
......
...@@ -347,7 +347,7 @@ import android.widget.Toast; ...@@ -347,7 +347,7 @@ import android.widget.Toast;
"notification. " + "notification. " +
"Selecting the notification will bring up the app and signal the MessageReceived " + "Selecting the notification will bring up the app and signal the MessageReceived " +
"event. Messages received when the app is dormant will be queued, and so " + "event. Messages received when the app is dormant will be queued, and so " +
"several ReceivingEnabled event might appear when the app awakens. As an app " + "several MessageReceived events might appear when the app awakens. As an app " +
"developer, it would be a good idea to give your users control over this property, " + "developer, it would be a good idea to give your users control over this property, " +
"so they can make their phones ignore text messages when your app is installed.") "so they can make their phones ignore text messages when your app is installed.")
public boolean ReceivingEnabled() { public boolean ReceivingEnabled() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment